From d4afa8bbabd83e2b68afcc61e44fadb9e7964b07 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 26 Jul 2013 17:45:19 +0000 Subject: [PATCH] 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 --- lib/IR/DebugInfo.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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(); } -- 2.34.1