summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-09-22 23:26:43 +0000
committerAdrian Prantl <aprantl@apple.com>2015-09-22 23:26:43 +0000
commita5206ce72a7eb77ff9f99462bb69dd7e79243cd0 (patch)
treea489fbc47651da75cf1eb615dbbc3d066d549312 /clang/lib/CodeGen/CGDebugInfo.cpp
parentadbd2b1f32ddc3fc9ee1726fe4f5c6fd3b51014d (diff)
downloadbcm5719-llvm-a5206ce72a7eb77ff9f99462bb69dd7e79243cd0.tar.gz
bcm5719-llvm-a5206ce72a7eb77ff9f99462bb69dd7e79243cd0.zip
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
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index ae1f5e7ecfa..72ddf4efc7c 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -3453,6 +3453,12 @@ CGDebugInfo::getOrCreateNameSpace(const NamespaceDecl *NSDecl) {
return NS;
}
+void CGDebugInfo::setDwoId(uint64_t Signature) {
+ assert(TheCU && "no main compile unit");
+ TheCU->setDWOId(Signature);
+}
+
+
void CGDebugInfo::finalize() {
// Creating types might create further types - invalidating the current
// element and the size(), so don't cache/reference them.
OpenPOWER on IntegriCloud