[llvm] r194883 - Replace the dangling context hotfix with an assertion.

Adrian Prantl aprantl at apple.com
Fri Nov 15 15:21:40 PST 2013


Author: adrian
Date: Fri Nov 15 17:21:39 2013
New Revision: 194883

URL: http://llvm.org/viewvc/llvm-project?rev=194883&view=rev
Log:
Replace the dangling context hotfix with an assertion.

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=194883&r1=194882&r2=194883&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Fri Nov 15 17:21:39 2013
@@ -886,10 +886,7 @@ DIE *CompileUnit::getOrCreateTypeDIE(con
   // Construct the context before querying for the existence of the DIE in case
   // such construction creates the DIE.
   DIE *ContextDIE = getOrCreateContextDIE(resolve(Ty.getContext()));
-  // TODO: Investigate if this beavior is intentional and possibly
-  // replace it with an assert.
-  if (!ContextDIE)
-    ContextDIE = getCUDie();
+  assert(ContextDIE);
 
   DIE *TyDIE = getDIE(Ty);
   if (TyDIE)





More information about the llvm-commits mailing list