aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-08-15 23:01:55 +0000
committerDevang Patel <dpatel@apple.com>2011-08-15 23:01:55 +0000
commit4111feff7ccefee4efda8832eb14a9e64b2ffc1a (patch)
tree197a7d4f2bcd62c1d6a1f8f1999019b466d69266
parentd946bda308fa62804ec2007b2c2426e9c90e94c4 (diff)
Use new DIBuilder::finalize() at the end to wrap up debug info encoding for a translation unit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137674 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGDebugInfo.h1
-rw-r--r--lib/CodeGen/CodeGenModule.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h
index 09e4628f47..fdc3baf2f3 100644
--- a/lib/CodeGen/CGDebugInfo.h
+++ b/lib/CodeGen/CGDebugInfo.h
@@ -152,6 +152,7 @@ class CGDebugInfo {
public:
CGDebugInfo(CodeGenModule &CGM);
~CGDebugInfo();
+ void finalize() { DBuilder.finalize(); }
/// setLocation - Update the current source location. If \arg loc is
/// invalid it is ignored.
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index d5d34634db..d442b097ab 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -125,6 +125,8 @@ void CodeGenModule::createObjCRuntime() {
}
void CodeGenModule::Release() {
+ if (DebugInfo)
+ DebugInfo->finalize();
EmitDeferred();
EmitCXXGlobalInitFunc();
EmitCXXGlobalDtorFunc();