From: Michael Ilseman Date: Mon, 15 Dec 2014 23:41:21 +0000 (+0000) Subject: Sink the isa into the assert X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=f651477d6660a7e13f5fb2415061a56e50452789;p=oota-llvm.git Sink the isa into the assert git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224291 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index d6f4ef81d74..cba6f1a3181 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -1532,10 +1532,8 @@ bool ModuleLinker::run() { GlobalValue *SGV = LazilyLinkGlobalValues.back(); LazilyLinkGlobalValues.pop_back(); - if (isa(SGV)) - assert(!cast(SGV)->isDeclaration() && - "users should not pass down decls"); - + assert((!isa(SGV) || !cast(SGV)->isDeclaration()) && + "users should not pass down decls"); if (linkGlobalValueBody(*SGV)) return true; }