[PATCH] D73462: [dwarf-5] Support DebugInfo for Defaulted parameters for C++ templates

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 10:08:47 PST 2020


dblaikie added inline comments.


================
Comment at: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1808-1809
   Record.push_back(VE.getMetadataOrNullID(N->getType()));
+  if (M.getDwarfVersion() >= 5)
+    Record.push_back(N->getDefault());
   Record.push_back(VE.getMetadataOrNullID(N->getValue()));
----------------
awpandey wrote:
> dblaikie wrote:
> > I don't think we should be using the DWARF version to decide on the schema - there's no other use of that technique in the parsing/writing code & I can think of some ways it might go poorly.
> > 
> > Better to encode it & it can be dropped during actual DWARF emission in the backend if the version doesn't support it.
> I am doing this for making record structure consistent with previous dwarf version.
There's no need/desire to make the record structure consistent with previous versions of DWARF.

The only consistency we have is the bitcode backwards compatibility itself.

Please remove these DWARFv5 tests.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73462/new/

https://reviews.llvm.org/D73462





More information about the llvm-commits mailing list