DebugInfo: Assert that all abstract scopes are subprograms, rather than conditionalizing.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.cpp
index 8731c887510cbc9d85cc4614073a44bf73a2ffb3..8064209ba37c368472bcba445666f354a9e5b068 100644 (file)
@@ -1569,8 +1569,7 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
   // Construct abstract scopes.
   for (LexicalScope *AScope : LScopes.getAbstractScopesList()) {
     DISubprogram SP(AScope->getScopeNode());
-    if (!SP.isSubprogram())
-      continue;
+    assert(SP.isSubprogram());
     // Collect info for variables that were optimized out.
     DIArray Variables = SP.getVariables();
     for (unsigned i = 0, e = Variables.getNumElements(); i != e; ++i) {