From f651477d6660a7e13f5fb2415061a56e50452789 Mon Sep 17 00:00:00 2001 From: Michael Ilseman Date: Mon, 15 Dec 2014 23:41:21 +0000 Subject: [PATCH] Sink the isa into the assert git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224291 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Linker/LinkModules.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; } -- 2.50.1