[PATCH] D25132: Invoke add-discriminator at -g0 -fsample-profile
Dehao Chen via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 14:45:53 PDT 2016
danielcdh created this revision.
danielcdh added reviewers: davidxl, dnovillo.
danielcdh added a subscriber: llvm-commits.
-fsample-profile needs discriminator, which will not be added if built with -g0. This patch makes sure the discriminator is added for sample-profile at -g0. A followup patch will be send out to update clang tests.
@@ -159,10 +159,8 @@
// If the function has debug information, but the user has disabled
// discriminators, do nothing.
// Simlarly, if the function has no debug info, do nothing.
- // Finally, if this module is built with dwarf versions earlier than 4,
// do nothing (discriminator support is a DWARF 4 feature).
- if (NoDiscriminators || !F.getSubprogram() ||
- F.getParent()->getDwarfVersion() < 4)
+ if (NoDiscriminators || !F.getSubprogram())
bool Changed = false;
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 726 bytes
Desc: not available
More information about the llvm-commits