Skip to content

Commit 299b878

Browse files
committed
Collapse conditional and add an assert for unhandled scope types.
llvm-svn: 187224
1 parent 6f4be90 commit 299b878

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/IR/DebugInfo.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -711,9 +711,7 @@ DIScope DIScope::getContext() const {
711711
if (isNameSpace())
712712
return DINameSpace(DbgNode).getContext();
713713

714-
if (isFile() || isCompileUnit())
715-
return DIScope();
716-
714+
assert(isFile() || isCompileUnit() && "Unhandled type of scope.");
717715
return DIScope();
718716
}
719717

0 commit comments

Comments
 (0)