Index: lib/CodeGen/BackendUtil.cpp =================================================================== --- lib/CodeGen/BackendUtil.cpp +++ lib/CodeGen/BackendUtil.cpp @@ -573,7 +573,6 @@ Options.DisableIntegratedAS = CodeGenOpts.DisableIntegratedAS; Options.CompressDebugSections = CodeGenOpts.CompressDebugSections; Options.RelaxELFRelocations = CodeGenOpts.RelaxELFRelocations; - Options.DebugInfoForProfiling = CodeGenOpts.DebugInfoForProfiling; // Set EABI version. Options.EABIVersion = llvm::StringSwitch(TargetOpts.EABIVersion) Index: lib/CodeGen/CodeGenFunction.cpp =================================================================== --- lib/CodeGen/CodeGenFunction.cpp +++ lib/CodeGen/CodeGenFunction.cpp @@ -793,6 +793,10 @@ Fn->addFnAttr("no-jump-tables", llvm::toStringRef(CGM.getCodeGenOpts().NoUseJumpTables)); + // Add debug-info-for-profiling value. + Fn->addFnAttr("debug-info-for-profiling", + llvm::toStringRef(CGM.getCodeGenOpts().DebugInfoForProfiling)); + if (getLangOpts().OpenCL) { // Add metadata for a kernel function. if (const FunctionDecl *FD = dyn_cast_or_null(D))