diff options
author | Eric Christopher <echristo@gmail.com> | 2013-07-26 17:45:19 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-07-26 17:45:19 +0000 |
commit | d4afa8bbabd83e2b68afcc61e44fadb9e7964b07 (patch) | |
tree | 395f1249b63346dbaee22be06fe8b7d6d12dbd78 /lib | |
parent | 58376d8ede436eb1fe474bca1582a4f7afe613f9 (diff) | |
download | external_llvm-d4afa8bbabd83e2b68afcc61e44fadb9e7964b07.zip external_llvm-d4afa8bbabd83e2b68afcc61e44fadb9e7964b07.tar.gz external_llvm-d4afa8bbabd83e2b68afcc61e44fadb9e7964b07.tar.bz2 |
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.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
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 @@ DIScope DIScope::getContext() const { if (isNameSpace()) return DINameSpace(DbgNode).getContext(); - if (isFile() || isCompileUnit()) - return DIScope(); - + assert(isFile() || isCompileUnit() && "Unhandled type of scope."); return DIScope(); } |