aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2022-01-10 14:55:03 -0800
committerAdrian Prantl <aprantl@apple.com>2022-01-10 16:13:40 -0800
commiteb200e584ece7ca8c1f8cac59ca5418956ccf1e4 (patch)
treee392ffb78a689b2fb257862663cd30501411712d /clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
parentbfeb92cb9cfb2b3d9f5ba7a36f10b714121ff763 (diff)
downloadllvm-eb200e584ece7ca8c1f8cac59ca5418956ccf1e4.zip
llvm-eb200e584ece7ca8c1f8cac59ca5418956ccf1e4.tar.gz
llvm-eb200e584ece7ca8c1f8cac59ca5418956ccf1e4.tar.bz2
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
Diffstat (limited to 'clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp')
-rw-r--r--clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
index f7b83c4..9fe7e5d 100644
--- a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
+++ b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
@@ -156,6 +156,7 @@ public:
CodeGenOpts.setDebuggerTuning(CI.getCodeGenOpts().getDebuggerTuning());
CodeGenOpts.DebugPrefixMap =
CI.getInvocation().getCodeGenOpts().DebugPrefixMap;
+ CodeGenOpts.DebugStrictDwarf = CI.getCodeGenOpts().DebugStrictDwarf;
}
~PCHContainerGenerator() override = default;