From 5491f2581069ff3c6fd47fab446dbac67c50e21d Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Sat, 10 Jan 2009 02:34:18 +0000 Subject: Fix thinko. Create parent scope if parent descriptor is *not* null. llvm-svn: 62022 --- llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp index 6293590fd67..db0d6566815 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp @@ -2618,12 +2618,12 @@ private: 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(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); -- cgit v1.2.3