diff options
author | Michael Ilseman <milseman@apple.com> | 2014-12-15 23:41:21 +0000 |
---|---|---|
committer | Michael Ilseman <milseman@apple.com> | 2014-12-15 23:41:21 +0000 |
commit | 8210281d13dec1141f52abf9af8fca913cc0e9b9 (patch) | |
tree | 3bcdf5c7428ef69794d302a5456fcc3943de4308 /llvm/lib/Linker/LinkModules.cpp | |
parent | cf87ab9390c27fec91eb9deefac4eba9e925e155 (diff) | |
download | bcm5719-llvm-8210281d13dec1141f52abf9af8fca913cc0e9b9.tar.gz bcm5719-llvm-8210281d13dec1141f52abf9af8fca913cc0e9b9.zip |
Sink the isa into the assert
llvm-svn: 224291
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index d6f4ef81d74..cba6f1a3181 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -1532,10 +1532,8 @@ bool ModuleLinker::run() { GlobalValue *SGV = LazilyLinkGlobalValues.back(); LazilyLinkGlobalValues.pop_back(); - if (isa<Function>(SGV)) - assert(!cast<Function>(SGV)->isDeclaration() && - "users should not pass down decls"); - + assert((!isa<Function>(SGV) || !cast<Function>(SGV)->isDeclaration()) && + "users should not pass down decls"); if (linkGlobalValueBody(*SGV)) return true; } |