From 9573a9cf9d1728975ac8a0791bd75f32f8cae4e0 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. llvm-svn: 224382 --- llvm/lib/Linker/LinkModules.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index cba6f1a..0e14415 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/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; } -- 2.7.4