diff options
| author | Manuel Jacob <me@manueljacob.de> | 2016-01-17 22:37:39 +0000 |
|---|---|---|
| committer | Manuel Jacob <me@manueljacob.de> | 2016-01-17 22:37:39 +0000 |
| commit | 190577ac81d6c7ef6c58850cfbbb3bf18c7c7fab (patch) | |
| tree | 444e207d2503b0d9c6e8cf8b6b1a8c2461b277e2 /llvm/lib/CodeGen | |
| parent | da2c9baa0735bfa36b0346f87fc3f783815cbc9c (diff) | |
| download | bcm5719-llvm-190577ac81d6c7ef6c58850cfbbb3bf18c7c7fab.tar.gz bcm5719-llvm-190577ac81d6c7ef6c58850cfbbb3bf18c7c7fab.zip | |
[opaque pointer types] [NFC] CallSite: use getFunctionType() instead of going through PointerType::getElementType.
Patch by Eduard Burtescu.
Reviewers: dblaikie, mjacob
Subscribers: dsanders, llvm-commits, dblaikie
Differential Revision: http://reviews.llvm.org/D16273
llvm-svn: 258023
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 10 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 5 |
2 files changed, 6 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index cfbb20947ac..efbd98ec4e3 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -880,9 +880,8 @@ bool FastISel::lowerCallTo(const CallInst *CI, MCSymbol *Symbol, unsigned NumArgs) { ImmutableCallSite CS(CI); - PointerType *PT = cast<PointerType>(CS.getCalledValue()->getType()); - FunctionType *FTy = cast<FunctionType>(PT->getElementType()); - Type *RetTy = FTy->getReturnType(); + FunctionType *FTy = CS.getFunctionType(); + Type *RetTy = CS.getType(); ArgListTy Args; Args.reserve(NumArgs); @@ -1010,9 +1009,8 @@ bool FastISel::lowerCallTo(CallLoweringInfo &CLI) { bool FastISel::lowerCall(const CallInst *CI) { ImmutableCallSite CS(CI); - PointerType *PT = cast<PointerType>(CS.getCalledValue()->getType()); - FunctionType *FuncTy = cast<FunctionType>(PT->getElementType()); - Type *RetTy = FuncTy->getReturnType(); + FunctionType *FuncTy = CS.getFunctionType(); + Type *RetTy = CS.getType(); ArgListTy Args; ArgListEntry Entry; diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 4e645a0d32d..83962309d3f 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -5383,9 +5383,8 @@ SelectionDAGBuilder::lowerInvokable(TargetLowering::CallLoweringInfo &CLI, void SelectionDAGBuilder::LowerCallTo(ImmutableCallSite CS, SDValue Callee, bool isTailCall, const BasicBlock *EHPadBB) { - PointerType *PT = cast<PointerType>(CS.getCalledValue()->getType()); - FunctionType *FTy = cast<FunctionType>(PT->getElementType()); - Type *RetTy = FTy->getReturnType(); + FunctionType *FTy = CS.getFunctionType(); + Type *RetTy = CS.getType(); TargetLowering::ArgListTy Args; TargetLowering::ArgListEntry Entry; |

