summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
authorMichael Ilseman <milseman@apple.com>2014-12-15 23:41:21 +0000
committerMichael Ilseman <milseman@apple.com>2014-12-15 23:41:21 +0000
commit8210281d13dec1141f52abf9af8fca913cc0e9b9 (patch)
tree3bcdf5c7428ef69794d302a5456fcc3943de4308 /llvm/lib/Linker/LinkModules.cpp
parentcf87ab9390c27fec91eb9deefac4eba9e925e155 (diff)
downloadbcm5719-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.cpp6
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;
}
OpenPOWER on IntegriCloud