Sink the isa into the assert

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224291 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael Ilseman 2014-12-15 23:41:21 +00:00
parent b4838f6d59
commit f651477d66

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