[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
Thu Jan 26 16:12:46 PST 2017
danielcdh created this revision.
Herald added a subscriber: mehdi_amini.
cfe change for https://reviews.llvm.org/D29203
https://reviews.llvm.org/D29205
Files:
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CodeGenFunction.cpp
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<FunctionDecl>(D))
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.85987.patch
Type: text/x-patch
Size: 1191 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170127/47a1255d/attachment-0001.bin>
More information about the cfe-commits
mailing list