From bc541ae238f550baf0b726a2d9f69a76be0d812d Mon Sep 17 00:00:00 2001 From: Michael Ilseman Date: Mon, 15 Dec 2014 21:47:09 +0000 Subject: [PATCH] Clean up warning about unused variable git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224281 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Linker/LinkModules.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 9c3f1834801..d6f4ef81d74 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -1532,8 +1532,10 @@ bool ModuleLinker::run() { GlobalValue *SGV = LazilyLinkGlobalValues.back(); LazilyLinkGlobalValues.pop_back(); - if (auto F = dyn_cast(SGV)) - assert(!F->isDeclaration() && "users should not pass down decls"); + if (isa(SGV)) + assert(!cast(SGV)->isDeclaration() && + "users should not pass down decls"); + if (linkGlobalValueBody(*SGV)) return true; }