diff options
author | Michael Ilseman <milseman@apple.com> | 2014-12-15 21:47:09 +0000 |
---|---|---|
committer | Michael Ilseman <milseman@apple.com> | 2014-12-15 21:47:09 +0000 |
commit | 00a6087f6bde494df5f338d0dee7713da7666c50 (patch) | |
tree | 0c0e318208064a1d756929aae7a44e8717f50a97 /llvm/lib/Linker/LinkModules.cpp | |
parent | 39e21f9c27201da101e9a04f6cb690ef13b0d906 (diff) | |
download | bcm5719-llvm-00a6087f6bde494df5f338d0dee7713da7666c50.tar.gz bcm5719-llvm-00a6087f6bde494df5f338d0dee7713da7666c50.zip |
Clean up warning about unused variable
llvm-svn: 224281
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index 9c3f1834801..d6f4ef81d74 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -1532,8 +1532,10 @@ bool ModuleLinker::run() { GlobalValue *SGV = LazilyLinkGlobalValues.back(); LazilyLinkGlobalValues.pop_back(); - if (auto F = dyn_cast<Function>(SGV)) - assert(!F->isDeclaration() && "users should not pass down decls"); + if (isa<Function>(SGV)) + assert(!cast<Function>(SGV)->isDeclaration() && + "users should not pass down decls"); + if (linkGlobalValueBody(*SGV)) return true; } |