[PATCH] D18706: [DWARF] Force a linkage_name on an inlined subprogram's abstract origin
Paul Robinson via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 13 13:10:33 PDT 2016
probinson added a comment.
In http://reviews.llvm.org/D18706#400222, @dblaikie wrote:
> Also - depending on how far you want to go, you could probably skip the mangled name for abstract subprograms that have a concrete definition (it'd mean having to search through the DWARF to find the concrete subprogram, then looking at its high/low pc to find the symbol in the symbol table with the mangled name there)
If the concrete out-of-line instance gets LTO'd away, that won't work.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:108-112
@@ -107,8 +107,7 @@
-static cl::opt<DefaultOnOff>
-DwarfLinkageNames("dwarf-linkage-names", cl::Hidden,
- cl::desc("Emit DWARF linkage-name attributes."),
- cl::values(clEnumVal(Default, "Default for platform"),
- clEnumVal(Enable, "Enabled"),
- clEnumVal(Disable, "Disabled"), clEnumValEnd),
- cl::init(Default));
+enum LinkageNameOption {
+ DefaultLinkageNames,
+ AllLinkageNames,
+ AbstractLinkageNames
+};
+static cl::opt<LinkageNameOption>
----------------
dblaikie wrote:
> Why did this need to become a 3 state when it was a boolean before? (when it's still only about 2 states, I think - before it was all-or-nothing, and now it's all-or-abstract)
This is about the command-line option, which used to be the 3-state DefaultOnOff and is now this new enum because the choices aren't really On and Off anymore. The DwarfDebug flag is still a bool.
http://reviews.llvm.org/D18706
More information about the llvm-commits
mailing list