[llvm] r219694 - Revert some parts of r196288 that were confusing and untested.

David Blaikie dblaikie at gmail.com
Tue Oct 14 10:12:02 PDT 2014


Author: dblaikie
Date: Tue Oct 14 12:12:02 2014
New Revision: 219694

URL: http://llvm.org/viewvc/llvm-project?rev=219694&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=219694&r1=219693&r2=219694&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Oct 14 12:12:02 2014
@@ -1312,14 +1312,8 @@ void DwarfDebug::addScopeVariable(Lexica
 
 // 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())) {





More information about the llvm-commits mailing list