From: David Blaikie Date: Tue, 14 Oct 2014 17:12:02 +0000 (+0000) Subject: Revert some parts of r196288 that were confusing and untested. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=2b0657e28f338ccd12166665a82bf55a7473e081;p=oota-llvm.git Revert some parts of r196288 that were confusing and untested. If we figure out why they should be here, let's add some testing of some kind so we can better demonstrate why it's needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219694 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 6e641884d76..f13ca2281a2 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1312,14 +1312,8 @@ void DwarfDebug::addScopeVariable(LexicalScope *LS, DbgVariable *Var) { // Gather and emit post-function debug information. void DwarfDebug::endFunction(const MachineFunction *MF) { - // Every beginFunction(MF) call should be followed by an endFunction(MF) call, - // though the beginFunction may not be called at all. - // We should handle both cases. - if (!CurFn) - CurFn = MF; - else - assert(CurFn == MF); - assert(CurFn != nullptr); + assert(CurFn == MF && + "endFunction should be called with the same function as beginFunction"); if (!MMI->hasDebugInfo() || LScopes.empty() || !FunctionDIs.count(MF->getFunction())) {