diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DIE.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DIE.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp index 7a14be65e2a..7fb3c90dcb6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp @@ -113,21 +113,13 @@ DIE::~DIE() { /// Climb up the parent chain to get the compile unit DIE to which this DIE /// belongs. DIE *DIE::getCompileUnit() { - DIE *Cu = checkCompileUnit(); - assert(Cu && "We should not have orphaned DIEs."); - return Cu; -} - -/// Climb up the parent chain to get the compile unit DIE this DIE belongs -/// to. Return NULL if DIE is not added to an owner yet. -DIE *DIE::checkCompileUnit() { DIE *p = this; while (p) { if (p->getTag() == dwarf::DW_TAG_compile_unit) return p; p = p->getParent(); } - return NULL; + llvm_unreachable("We should not have orphaned DIEs."); } DIEValue *DIE::findAttribute(uint16_t Attribute) { |