[PATCH] Fix bug 19437 - Only add discriminators for DWARF 4 and above.

David Blaikie dblaikie at gmail.com
Thu Apr 17 13:13:26 PDT 2014



================
Comment at: include/llvm/Support/Dwarf.h:957
@@ +956,3 @@
+/// Return Dwarf Version by checking module flags.
+inline unsigned getDwarfVersionFromModule(const Module *M) {
+  Value *Val = M->getModuleFlag("Dwarf Version");
----------------
Chandler Carruth wrote:
> David Blaikie wrote:
> > This might be worth being out of line, maybe. Not a big deal.
> As Eric was indicating, this can't be in Support. I think this should be a method on Module personally. It needs to be somewhere in the IR library at least.
Yeah, a method on Module sounds pretty reasonable to me. (it's a bit special case, I wouldn't mind a generic system for retrieving module flags with defaults, but not fussed)


http://reviews.llvm.org/D3413






More information about the llvm-commits mailing list