]> granicus.if.org Git - clang/commitdiff
Use new DIBuilder::finalize() at the end to wrap up debug info encoding for a transla...
authorDevang Patel <dpatel@apple.com>
Mon, 15 Aug 2011 23:01:55 +0000 (23:01 +0000)
committerDevang Patel <dpatel@apple.com>
Mon, 15 Aug 2011 23:01:55 +0000 (23:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137674 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.h
lib/CodeGen/CodeGenModule.cpp

index 09e4628f4763a867b072995fc3a997c57e6199e1..fdc3baf2f370eca85dfc510ca1ab53816ebef76a 100644 (file)
@@ -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.
index d5d34634dbcf0791c89c3b1766538fd03f02e7e4..d442b097ab865df4129ef8fbeeea50b7b2f88cb3 100644 (file)
@@ -125,6 +125,8 @@ void CodeGenModule::createObjCRuntime() {
 }
 
 void CodeGenModule::Release() {
+  if (DebugInfo)
+    DebugInfo->finalize();
   EmitDeferred();
   EmitCXXGlobalInitFunc();
   EmitCXXGlobalDtorFunc();