[PATCH] D29205: Change debug-info-for-profiling from a TargetOption to a function attribute.
Dehao Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 27 08:43:53 PST 2017
danielcdh updated this revision to Diff 86058.
danielcdh added a comment.
change to use module flag.
https://reviews.llvm.org/D29205
Files:
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CodeGenModule.cpp
Index: lib/CodeGen/CodeGenModule.cpp
===================================================================
--- lib/CodeGen/CodeGenModule.cpp
+++ lib/CodeGen/CodeGenModule.cpp
@@ -448,6 +448,8 @@
// (and warn about it, too).
getModule().addModuleFlag(llvm::Module::Warning, "Debug Info Version",
llvm::DEBUG_METADATA_VERSION);
+ if (CodeGenOpts.DebugInfoForProfiling)
+ getModule().addModuleFlag(llvm::Module::Warning, "DebugInfoForProfiling", 1);
// We need to record the widths of enums and wchar_t, so that we can generate
// the correct build attributes in the ARM backend.
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<llvm::EABI>(TargetOpts.EABIVersion)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29205.86058.patch
Type: text/x-patch
Size: 1193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170127/4384660f/attachment.bin>
More information about the cfe-commits
mailing list