Emit the C++ dialect in -gmodules .pcm files.
authorAdrian Prantl <aprantl@apple.com>
Mon, 10 Jan 2022 22:55:03 +0000 (14:55 -0800)
committerAdrian Prantl <aprantl@apple.com>
Tue, 11 Jan 2022 00:13:40 +0000 (16:13 -0800)
commiteb200e584ece7ca8c1f8cac59ca5418956ccf1e4
treee392ffb78a689b2fb257862663cd30501411712d
parentbfeb92cb9cfb2b3d9f5ba7a36f10b714121ff763
Emit the C++ dialect in -gmodules .pcm files.

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

Patch by Shubham Rastogi!

Differential Revision: https://reviews.llvm.org/D116790
clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
clang/test/Modules/ModuleDebugInfo.cpp