summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-07-26 17:45:19 +0000
committerEric Christopher <echristo@gmail.com>2013-07-26 17:45:19 +0000
commitd4afa8bbabd83e2b68afcc61e44fadb9e7964b07 (patch)
tree395f1249b63346dbaee22be06fe8b7d6d12dbd78 /lib
parent58376d8ede436eb1fe474bca1582a4f7afe613f9 (diff)
downloadllvm-d4afa8bbabd83e2b68afcc61e44fadb9e7964b07.tar.gz
llvm-d4afa8bbabd83e2b68afcc61e44fadb9e7964b07.tar.bz2
llvm-d4afa8bbabd83e2b68afcc61e44fadb9e7964b07.tar.xz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/IR/DebugInfo.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index 369895ce56..4d5ae260f6 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -711,9 +711,7 @@ DIScope DIScope::getContext() const {
if (isNameSpace())
return DINameSpace(DbgNode).getContext();
- if (isFile() || isCompileUnit())
- return DIScope();
-
+ assert(isFile() || isCompileUnit() && "Unhandled type of scope.");
return DIScope();
}