Clean up warning about unused variable

llvm-svn: 224281
This commit is contained in:
Michael Ilseman 2014-12-15 21:47:09 +00:00
parent 39e21f9c27
commit 00a6087f6b
1 changed files with 4 additions and 2 deletions

View File

@ -1532,8 +1532,10 @@ bool ModuleLinker::run() {
GlobalValue *SGV = LazilyLinkGlobalValues.back();
LazilyLinkGlobalValues.pop_back();
if (auto F = dyn_cast<Function>(SGV))
assert(!F->isDeclaration() && "users should not pass down decls");
if (isa<Function>(SGV))
assert(!cast<Function>(SGV)->isDeclaration() &&
"users should not pass down decls");
if (linkGlobalValueBody(*SGV))
return true;
}