summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-12-16 22:29:43 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-12-16 22:29:43 +0000
commit9573a9cf9d1728975ac8a0791bd75f32f8cae4e0 (patch)
tree3f53094a4eb3f9f6b7b19e679ee5ffabdb6f5257 /llvm/lib/Linker/LinkModules.cpp
parent7fc90fc7e97fd1e8d01f601bc169d6e94e7a0f12 (diff)
downloadbcm5719-llvm-9573a9cf9d1728975ac8a0791bd75f32f8cae4e0.tar.gz
bcm5719-llvm-9573a9cf9d1728975ac8a0791bd75f32f8cae4e0.zip
Make the assert a bit stronger.
We should get no declarations in here. llvm-svn: 224382
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index cba6f1a3181..0e144157af4 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<Function>(SGV) || !cast<Function>(SGV)->isDeclaration()) &&
- "users should not pass down decls");
+ assert(!SGV->isDeclaration() && "users should not pass down decls");
if (linkGlobalValueBody(*SGV))
return true;
}
OpenPOWER on IntegriCloud