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

Awanish Pandey via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 30 03:24:29 PST 2020


awpandey marked an inline comment as done and an inline comment as not done.
awpandey 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()));
----------------
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.


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

https://reviews.llvm.org/D73462





More information about the cfe-commits mailing list