diff options
Diffstat (limited to 'lib/Module')
-rw-r--r-- | lib/Module/FunctionAlias.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Module/FunctionAlias.cpp b/lib/Module/FunctionAlias.cpp index a98b74fb..aa80b35d 100644 --- a/lib/Module/FunctionAlias.cpp +++ b/lib/Module/FunctionAlias.cpp @@ -135,10 +135,8 @@ bool FunctionAliasPass::runOnModule(Module &M) { const FunctionType *FunctionAliasPass::getFunctionType(const GlobalValue *gv) { const Type *type = gv->getType(); - while (type->isPointerTy()) { - const PointerType *ptr = cast<PointerType>(type); - type = ptr->getElementType(); - } + while (type->isPointerTy()) + type = type->getPointerElementType(); return cast<FunctionType>(type); } |