[llvm-commits] [llvm] r62022 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Devang Patel dpatel at apple.com
Fri Jan 9 18:34:18 PST 2009


Author: dpatel
Date: Fri Jan  9 20:34:18 2009
New Revision: 62022

URL: http://llvm.org/viewvc/llvm-project?rev=62022&view=rev
Log:
Fix thinko. Create parent scope if parent descriptor is *not* null.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=62022&r1=62021&r2=62022&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Fri Jan  9 20:34:18 2009
@@ -2618,12 +2618,12 @@
     if (!Slot) {
       // FIXME - breaks down when the context is an inlined function.
       DIDescriptor ParentDesc;
-      DIBlock *DB = new DIBlock(V);
+      DIDescriptor *DB = new DIBlock(V);
       if (DIBlock *Block = dyn_cast<DIBlock>(DB)) {
         ParentDesc = Block->getContext();
       }
       DbgScope *Parent = ParentDesc.isNull() ? 
-        getOrCreateScope(ParentDesc.getGV()) : NULL;
+        NULL : getOrCreateScope(ParentDesc.getGV());
       Slot = new DbgScope(Parent, DB);
       if (Parent) {
         Parent->AddScope(Slot);





More information about the llvm-commits mailing list