From c521c7bea5ac99eab07cac60bd6d1aa3ff7c17f8 Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Wed, 25 Nov 2015 00:42:24 +0000 Subject: [OperandBundles] Extract duplicated code into a helper function, NFC llvm-svn: 254047 --- llvm/lib/Transforms/Utils/InlineFunction.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp') 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 InvokeArgs(CS.arg_begin(), CS.arg_end()); SmallVector 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 -- cgit v1.2.3