summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-11-25 00:42:24 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-11-25 00:42:24 +0000
commitc521c7bea5ac99eab07cac60bd6d1aa3ff7c17f8 (patch)
treea6235cccd6044eb63bce6d3fe6eb97cabb0253eb /llvm/lib/Transforms/Utils/InlineFunction.cpp
parent7629346193d366ab420f45947fe45cc5a79515d5 (diff)
downloadbcm5719-llvm-c521c7bea5ac99eab07cac60bd6d1aa3ff7c17f8.tar.gz
bcm5719-llvm-c521c7bea5ac99eab07cac60bd6d1aa3ff7c17f8.zip
[OperandBundles] Extract duplicated code into a helper function, NFC
llvm-svn: 254047
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index dd8e5b3b044..aee84c07d59 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -210,11 +210,7 @@ HandleCallsInBlockInlinedThroughInvoke(BasicBlock *BB, BasicBlock *UnwindEdge) {
SmallVector<Value*, 8> InvokeArgs(CS.arg_begin(), CS.arg_end());
SmallVector<OperandBundleDef, 1> OpBundles;
- // Copy the OperandBundeUse instances to OperandBundleDefs. These two are
- // *different* representations of operand bundles: see the documentation in
- // InstrTypes.h for more details.
- for (unsigned i = 0, e = CS.getNumOperandBundles(); i != e; ++i)
- OpBundles.emplace_back(CS.getOperandBundleAt(i));
+ CS.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
OpenPOWER on IntegriCloud