From b88a543abb88feddcae4eb9ec1377bb2db3dc6cb Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Sat, 7 Nov 2015 01:56:04 +0000 Subject: [PATCH] [OperandBundles] Rename accessor, NFC Rename getOperandBundle to getOperandBundleAt since that's more obvious. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252388 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/CallSite.h | 4 ++-- include/llvm/IR/InstrTypes.h | 6 +++--- lib/Bitcode/Writer/BitcodeWriter.cpp | 2 +- lib/IR/AsmWriter.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/llvm/IR/CallSite.h b/include/llvm/IR/CallSite.h index dd3ebf228a0..ffea707a32d 100644 --- a/include/llvm/IR/CallSite.h +++ b/include/llvm/IR/CallSite.h @@ -375,8 +375,8 @@ public: CALLSITE_DELEGATE_GETTER(getNumTotalBundleOperands()); } - OperandBundleUse getOperandBundle(unsigned Index) const { - CALLSITE_DELEGATE_GETTER(getOperandBundle(Index)); + OperandBundleUse getOperandBundleAt(unsigned Index) const { + CALLSITE_DELEGATE_GETTER(getOperandBundleAt(Index)); } Optional getOperandBundle(StringRef Name) const { diff --git a/include/llvm/IR/InstrTypes.h b/include/llvm/IR/InstrTypes.h index 3fd6e1b678a..e96f7ad1036 100644 --- a/include/llvm/IR/InstrTypes.h +++ b/include/llvm/IR/InstrTypes.h @@ -1232,7 +1232,7 @@ public: } /// \brief Return the operand bundle at a specific index. - OperandBundleUse getOperandBundle(unsigned Index) const { + OperandBundleUse getOperandBundleAt(unsigned Index) const { assert(Index < getNumOperandBundles() && "Index out of bounds!"); return operandBundleFromBundleOpInfo(*(bundle_op_info_begin() + Index)); } @@ -1242,7 +1242,7 @@ public: unsigned countOperandBundlesOfType(StringRef Name) const { unsigned Count = 0; for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i) - if (getOperandBundle(i).Tag == Name) + if (getOperandBundleAt(i).Tag == Name) Count++; return Count; @@ -1256,7 +1256,7 @@ public: assert(countOperandBundlesOfType(Name) < 2 && "Precondition violated!"); for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i) { - OperandBundleUse U = getOperandBundle(i); + OperandBundleUse U = getOperandBundleAt(i); if (U.Tag == Name) return U; } diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index b88e55c92cb..7497535d561 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1738,7 +1738,7 @@ static void WriteOperandBundles(BitstreamWriter &Stream, ImmutableCallSite CS, LLVMContext &C = CS.getInstruction()->getContext(); for (unsigned i = 0, e = CS.getNumOperandBundles(); i != e; ++i) { - const auto &Bundle = CS.getOperandBundle(i); + const auto &Bundle = CS.getOperandBundleAt(i); Record.push_back(C.getOperandBundleTagID(Bundle.Tag)); for (auto &Input : Bundle.Inputs) diff --git a/lib/IR/AsmWriter.cpp b/lib/IR/AsmWriter.cpp index 2f8a3406a37..1816ea2102b 100644 --- a/lib/IR/AsmWriter.cpp +++ b/lib/IR/AsmWriter.cpp @@ -2169,7 +2169,7 @@ void AssemblyWriter::writeOperandBundles(ImmutableCallSite CS) { bool FirstBundle = true; for (unsigned i = 0, e = CS.getNumOperandBundles(); i != e; ++i) { - OperandBundleUse BU = CS.getOperandBundle(i); + OperandBundleUse BU = CS.getOperandBundleAt(i); if (!FirstBundle) Out << ", "; -- 2.34.1