From 86c5112409d51620663cf59afeaf5c3a4017eded Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 12 May 2025 16:17:43 -0700 Subject: [NFCI][LLVM/MLIR] Adopt `TrailingObjects` convenience API (#138554) Adopt `TrailingObjects` convenience API that was added in https://github.com/llvm/llvm-project/pull/138970 in LLVM and MLIR code. --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 1e07f06..64f9638 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -542,7 +542,7 @@ private: : Value(Ty, SubclassID), Opcode(Info.Opcode), Flags(Info.Flags), NumOperands(OpIDs.size()), BlockAddressBB(Info.BlockAddressBB), SrcElemTy(Info.SrcElemTy), InRange(Info.InRange) { - llvm::uninitialized_copy(OpIDs, getTrailingObjects()); + llvm::uninitialized_copy(OpIDs, getTrailingObjects()); } BitcodeConstant &operator=(const BitcodeConstant &) = delete; @@ -559,7 +559,7 @@ public: static bool classof(const Value *V) { return V->getValueID() == SubclassID; } ArrayRef getOperandIDs() const { - return ArrayRef(getTrailingObjects(), NumOperands); + return ArrayRef(getTrailingObjects(), NumOperands); } std::optional getInRange() const { -- cgit v1.1