summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 508a6927c2..a47eeab430 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -886,10 +886,7 @@ DIE *CompileUnit::getOrCreateTypeDIE(const MDNode *TyNode) {
// 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)