From e1bf514b2bbb0bce6077641fb460d70d4fb84334 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 16 Dec 2014 22:29:43 +0000 Subject: [PATCH] Make the assert a bit stronger. We should get no declarations in here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224382 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Linker/LinkModules.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index cba6f1a3181..0e144157af4 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -1532,8 +1532,7 @@ bool ModuleLinker::run() { GlobalValue *SGV = LazilyLinkGlobalValues.back(); LazilyLinkGlobalValues.pop_back(); - assert((!isa(SGV) || !cast(SGV)->isDeclaration()) && - "users should not pass down decls"); + assert(!SGV->isDeclaration() && "users should not pass down decls"); if (linkGlobalValueBody(*SGV)) return true; }