From a5206ce72a7eb77ff9f99462bb69dd7e79243cd0 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 22 Sep 2015 23:26:43 +0000 Subject: Module Debugging: Use the clang module signature as the module's dwo_id when building a module. Clang already records the module signature when building a skeleton CU to reference a clang module. Matching the id in the skeleton with the one in the module allows a DWARF consumer to verify that they found the correct version of the module without them needing to know about the clang module format. llvm-svn: 248345 --- clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp') diff --git a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp index 310e374e348..8ceaf7cb3a0 100644 --- a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp +++ b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp @@ -142,7 +142,6 @@ public: CodeGenOpts.ThreadModel = "single"; CodeGenOpts.DebugTypeExtRefs = true; CodeGenOpts.setDebugInfo(CodeGenOptions::FullDebugInfo); - CodeGenOpts.SplitDwarfFile = OutputFileName; } ~PCHContainerGenerator() override = default; @@ -201,6 +200,7 @@ public: M->setTargetTriple(Ctx.getTargetInfo().getTriple().getTriple()); M->setDataLayout(Ctx.getTargetInfo().getDataLayoutString()); + Builder->getModuleDebugInfo()->setDwoId(Buffer->Signature); // Finalize the Builder. if (Builder) -- cgit v1.2.3