]> granicus.if.org Git - clang/commitdiff
Change debug-info-for-profiling from a TargetOption to a function attribute.
authorDehao Chen <dehao@google.com>
Wed, 1 Feb 2017 22:45:21 +0000 (22:45 +0000)
committerDehao Chen <dehao@google.com>
Wed, 1 Feb 2017 22:45:21 +0000 (22:45 +0000)
Summary: cfe change for https://reviews.llvm.org/D29203

Reviewers: echristo, dblaikie

Reviewed By: dblaikie

Subscribers: mehdi_amini, cfe-commits

Differential Revision: https://reviews.llvm.org/D29205

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293834 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CGDebugInfo.cpp

index 1bf3c5aec79efb8b88e5face34d9aa1ab915b541..712c9611bd8009c515658ef54f4fef07d02479e4 100644 (file)
@@ -568,7 +568,6 @@ void EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
   Options.DisableIntegratedAS = CodeGenOpts.DisableIntegratedAS;
   Options.CompressDebugSections = CodeGenOpts.CompressDebugSections;
   Options.RelaxELFRelocations = CodeGenOpts.RelaxELFRelocations;
-  Options.DebugInfoForProfiling = CodeGenOpts.DebugInfoForProfiling;
 
   // Set EABI version.
   Options.EABIVersion = llvm::StringSwitch<llvm::EABI>(TargetOpts.EABIVersion)
index b58afaaa6023b79a9b9109d12c76f058b605751e..7eb0af2d371a8f532666ba80747f3a69be2286ec 100644 (file)
@@ -509,7 +509,8 @@ void CGDebugInfo::CreateCompileUnit() {
                                    Checksum),
       Producer, LO.Optimize, CGM.getCodeGenOpts().DwarfDebugFlags, RuntimeVers,
       CGM.getCodeGenOpts().SplitDwarfFile, EmissionKind, 0 /* DWOid */,
-      CGM.getCodeGenOpts().SplitDwarfInlining);
+      CGM.getCodeGenOpts().SplitDwarfInlining,
+      CGM.getCodeGenOpts().DebugInfoForProfiling);
 }
 
 llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) {