Collapse conditional and add an assert for unhandled scope types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187224 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index 369895c..4d5ae26 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -711,9 +711,7 @@
if (isNameSpace())
return DINameSpace(DbgNode).getContext();
- if (isFile() || isCompileUnit())
- return DIScope();
-
+ assert(isFile() || isCompileUnit() && "Unhandled type of scope.");
return DIScope();
}