From: Eric Christopher Date: Fri, 26 Jul 2013 17:45:19 +0000 (+0000) Subject: Collapse conditional and add an assert for unhandled scope types. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d4afa8bbabd83e2b68afcc61e44fadb9e7964b07;p=oota-llvm.git 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 369895ce568..4d5ae260f62 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(); }