[llvm] r194843 - Restore the behaviour from before r194728.
Adrian Prantl
aprantl at apple.com
Fri Nov 15 11:53:23 PST 2013
Author: adrian
Date: Fri Nov 15 13:53:23 2013
New Revision: 194843
URL: http://llvm.org/viewvc/llvm-project?rev=194843&view=rev
Log:
Restore the behaviour from before r194728.
If getDIE() fails, getOrCreateContextDIE() should also return the CUDie.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=194843&r1=194842&r2=194843&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Fri Nov 15 13:53:23 2013
@@ -871,7 +871,9 @@ DIE *CompileUnit::getOrCreateContextDIE(
return getOrCreateNameSpace(DINameSpace(Context));
if (Context.isSubprogram())
return getOrCreateSubprogramDIE(DISubprogram(Context));
- return getDIE(Context);
+ if (DIE *ContextDIE = getDIE(Context))
+ return ContextDIE;
+ return getCUDie();
}
/// getOrCreateTypeDIE - Find existing DIE or create new DIE for the
More information about the llvm-commits
mailing list