From 299b8782b2af6d91d8b18ab9d339e5bd3ab17919 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. llvm-svn: 187224 --- llvm/lib/IR/DebugInfo.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 369895c..4d5ae26 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/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.7.4