DebugInfo: Assert rather than conditionalizing when a CU's subprogram list contains declarations.

llvm-svn: 209039
This commit is contained in:
David Blaikie 2014-05-16 22:21:45 +00:00
parent 0fcad8837b
commit 48369d1b8e
1 changed files with 2 additions and 2 deletions

View File

@ -846,8 +846,8 @@ void DwarfDebug::collectDeadVariables() {
continue;
assert(SP.isSubprogram() &&
"CU's subprogram list contains a non-subprogram");
if (!SP.isDefinition())
continue;
assert(SP.isDefinition() &&
"CU's subprogram list contains a subprogram declaration");
DIArray Variables = SP.getVariables();
if (Variables.getNumElements() == 0)
continue;