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 cf87ab9390
commit 8210281d13
1 changed files with 2 additions and 4 deletions

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