[llvm-commits] [llvm] r137673 - in /llvm/trunk: docs/ReleaseNotes.html include/llvm/Analysis/DIBuilder.h lib/Analysis/DIBuilder.cpp

Devang Patel dpatel at apple.com
Mon Aug 15 16:00:01 PDT 2011


Author: dpatel
Date: Mon Aug 15 18:00:00 2011
New Revision: 137673

URL: http://llvm.org/viewvc/llvm-project?rev=137673&view=rev
Log:
Add a finalize() hook, that'll let DIBuilder construct compile unit lazily.

Modified:
    llvm/trunk/docs/ReleaseNotes.html
    llvm/trunk/include/llvm/Analysis/DIBuilder.h
    llvm/trunk/lib/Analysis/DIBuilder.cpp

Modified: llvm/trunk/docs/ReleaseNotes.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=137673&r1=137672&r2=137673&view=diff
==============================================================================
--- llvm/trunk/docs/ReleaseNotes.html (original)
+++ llvm/trunk/docs/ReleaseNotes.html Mon Aug 15 18:00:00 2011
@@ -673,6 +673,10 @@
 <li>The <code>LLVMAddLowerSetJmpPass</code> function from the C API was removed
     because the <code>LowerSetJmp</code> pass was removed.</li>
 
+<li>The <code>DIBuilder</code> interface used by front ends to encode debugging 
+    information in the LLVM IR now expects clients to use <code>DIBuilder::finalize()</code>
+    at the end of translation unit to complete debugging information encoding.</li>
+
 </ul>
 </div>
 

Modified: llvm/trunk/include/llvm/Analysis/DIBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DIBuilder.h?rev=137673&r1=137672&r2=137673&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/DIBuilder.h (original)
+++ llvm/trunk/include/llvm/Analysis/DIBuilder.h Mon Aug 15 18:00:00 2011
@@ -59,6 +59,9 @@
     const MDNode *getCU() { return TheCU; }
     enum ComplexAddrKind { OpPlus=1, OpDeref };
 
+    /// finalize - Construct any deferred debug info descriptors.
+    void finalize();
+
     /// createCompileUnit - A CompileUnit provides an anchor for all debugging
     /// information generated during this instance of compilation.
     /// @param Lang     Source programming language, eg. dwarf::DW_LANG_C99

Modified: llvm/trunk/lib/Analysis/DIBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DIBuilder.cpp?rev=137673&r1=137672&r2=137673&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DIBuilder.cpp (original)
+++ llvm/trunk/lib/Analysis/DIBuilder.cpp Mon Aug 15 18:00:00 2011
@@ -31,6 +31,10 @@
 DIBuilder::DIBuilder(Module &m)
   : M(m), VMContext(M.getContext()), TheCU(0), DeclareFn(0), ValueFn(0) {}
 
+/// finalize - Construct any deferred debug info descriptors.
+void DIBuilder::finalize() {
+}
+
 /// createCompileUnit - A CompileUnit provides an anchor for all debugging
 /// information generated during this instance of compilation.
 void DIBuilder::createCompileUnit(unsigned Lang, StringRef Filename, 





More information about the llvm-commits mailing list