[ORC] Narrow a cast: the block guarded by the condition only handles

GlobalVariables, not all GlobalValues.

llvm-svn: 343358
This commit is contained in:
Lang Hames 2018-09-28 20:16:16 +00:00
parent c06db02748
commit b62f73420b
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ static void extractAliases(MaterializationResponsibility &R, Module &M,
A->replaceAllUsesWith(F);
A->eraseFromParent();
F->setName(AliasName);
} else if (isa<GlobalValue>(Aliasee)) {
} else if (isa<GlobalVariable>(Aliasee)) {
auto *G = cloneGlobalVariableDecl(M, *cast<GlobalVariable>(Aliasee));
A->replaceAllUsesWith(G);
A->eraseFromParent();