[PATCH] D99250: [DebugInfo] Fix the mismatching of C++ language tags and Dwarf versions.

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 25 10:39:15 PDT 2021


dblaikie added a comment.

My 2c:

I don't have super strong feelings either way about this particular issue.

Yes, I agree a consumer shouldn't crash and probably should handle an unknown language code fairly gracefully - but equally it's a loss of quality for a conforming DWARFv3 consumer to see a language code it doesn't recognize and drop all C++ support it might have/been able to use if it had been given a code that existed in v3. (this'd be nicely addressed by separating language code from version - then it could warn the user "unknown C++ version, I'll just use the latest version I support - so you might not be able to write newer C++ features in the expression evaluator, like hyperlambdas or whatever weird things exist in future C++")

So it's a tradeoff between consumers that know about newer C++ language codes and those that don't. I suspect if you're compiling with DWARFv3 it's because you've got consumers who only understand v3 & could benefit from the old code (but maybe you have some sample profiler, or crash symbolizer that only understands that - which doesn't actually care about the language version - and the interactive debugger you use is totally capable of parsing DWARFv5 and recognizing all its variety of language codes even when parsing old DWARF).

So... dunno.

In this specific case, I guess then the question is for the user: @Esme: What would your DWARF consumer do with an unknown code if it didn't crash? Would the user experience be significantly worse/different because it didn't recognize the code?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99250



More information about the cfe-commits mailing list