This is an archive of the discontinued LLVM Phabricator instance.

C++ -gmodules .pcm files don't have the same DW_AT_language dialect
ClosedPublic

Authored by rastogishubham on Jan 6 2022, 8:38 PM.

Details

Summary

Because of commit: https://reviews.llvm.org/D104291 the -gmodules .pcm files do not have the same DW_AT_language dialect as the .o file. This was a simple matter of passing the DebugStrictDwarf flag to the PCHContainerGenerator object's CodeGenOpts from the CompilerInstance passed in to it.

Before this change if you ran dwarfdump on the gmodule cache folder you would get DW_AT_language (DW_LANG_C_plus_plus) even when using -std=c++14 with clang

Diff Detail

Event Timeline

rastogishubham requested review of this revision.Jan 6 2022, 8:38 PM
rastogishubham created this revision.
rastogishubham edited the summary of this revision. (Show Details)Jan 6 2022, 8:43 PM

Thanks! This will need some kind of test.

This change broke the test in ModuleDebugInfo.cpp, I have fixed that issue, and this also will act as a test for this change

aprantl accepted this revision.Jan 10 2022, 2:53 PM
This revision is now accepted and ready to land.Jan 10 2022, 2:53 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJan 10 2022, 4:14 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript