summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-11-15 23:21:39 +0000
committerAdrian Prantl <aprantl@apple.com>2013-11-15 23:21:39 +0000
commit6bc810a49983e12006ba7a0dba61f7b2534b8f26 (patch)
tree1408528560c95ca6821986d5b46bb7f09e31aea1 /lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parent445fd04f530e9f8467f8f8f8b8e5b8c8bdaa353c (diff)
downloadllvm-6bc810a49983e12006ba7a0dba61f7b2534b8f26.tar.gz
llvm-6bc810a49983e12006ba7a0dba61f7b2534b8f26.tar.bz2
llvm-6bc810a49983e12006ba7a0dba61f7b2534b8f26.tar.xz
Replace the dangling context hotfix with an assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194883 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-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)