aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-12-10 06:39:02 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-12-10 06:39:02 +0000
commitccd14566e2df8335e5c9bfc75ca6cf31673db6b0 (patch)
tree5f051a876e90cc72e2d0f67b3a40c40003448f09 /llvm/lib/Transforms/Utils/InlineFunction.cpp
parentd5af8ae17fae996749658e9be46e8122798760e8 (diff)
downloadllvm-ccd14566e2df8335e5c9bfc75ca6cf31673db6b0.zip
llvm-ccd14566e2df8335e5c9bfc75ca6cf31673db6b0.tar.gz
llvm-ccd14566e2df8335e5c9bfc75ca6cf31673db6b0.tar.bz2
Add arg_begin() and arg_end() to CallInst and InvokeInst; NFCI
- This simplifies the CallSite class, arg_begin / arg_end are now simple wrapper getters. - In several places, we were creating CallSite instances solely to call arg_begin and arg_end. With this change, that's no longer required. llvm-svn: 255226
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index 9a0aabc..cafd181 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -206,11 +206,10 @@ HandleCallsInBlockInlinedThroughInvoke(BasicBlock *BB, BasicBlock *UnwindEdge) {
BB->getInstList().pop_back();
// Create the new invoke instruction.
- ImmutableCallSite CS(CI);
- SmallVector<Value*, 8> InvokeArgs(CS.arg_begin(), CS.arg_end());
+ SmallVector<Value*, 8> InvokeArgs(CI->arg_begin(), CI->arg_end());
SmallVector<OperandBundleDef, 1> OpBundles;
- CS.getOperandBundlesAsDefs(OpBundles);
+ CI->getOperandBundlesAsDefs(OpBundles);
// Note: we're round tripping operand bundles through memory here, and that
// can potentially be avoided with a cleverer API design that we do not have