Sink the isa into the assert

llvm-svn: 224291
This commit is contained in:
Michael Ilseman 2014-12-15 23:41:21 +00:00
parent 0a4e0a7b23
commit d27db299e8

View File

@ -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;
}