[llvm] r187224 - Collapse conditional and add an assert for unhandled scope types.
Eric Christopher
echristo at gmail.com
Fri Jul 26 10:45:19 PDT 2013
Author: echristo
Date: Fri Jul 26 12:45:19 2013
New Revision: 187224
URL: http://llvm.org/viewvc/llvm-project?rev=187224&view=rev
Log:
Collapse conditional and add an assert for unhandled scope types.
Modified:
llvm/trunk/lib/IR/DebugInfo.cpp
Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=187224&r1=187223&r2=187224&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Fri Jul 26 12:45:19 2013
@@ -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();
}
More information about the llvm-commits
mailing list