summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-10-14 17:12:02 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-10-14 17:12:02 +0000
commite75f963c611b15e2da123143a7e0007ef7adb940 (patch)
tree7e3ee876d2c5a3e0ac64b40c3c8c4c7e050be916 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent27549023b0f8b99741cbd639504677f9dd0ad6df (diff)
downloadbcm5719-llvm-e75f963c611b15e2da123143a7e0007ef7adb940.tar.gz
bcm5719-llvm-e75f963c611b15e2da123143a7e0007ef7adb940.zip
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. llvm-svn: 219694
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 6e641884d76..f13ca2281a2 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/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())) {
OpenPOWER on IntegriCloud