From 6257621f41d1deb31cfbfcee993a75991a0bca13 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 30 Mar 2025 18:43:02 -0700 Subject: [llvm] Use llvm::append_range (NFC) (#133658) --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp') diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 34ba25dccc36..49411098d9c0 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1209,8 +1209,7 @@ void ModuleBitcodeWriter::writeTypeTable() { TypeVals.push_back(TET->getNumTypeParameters()); for (Type *InnerTy : TET->type_params()) TypeVals.push_back(VE.getTypeID(InnerTy)); - for (unsigned IntParam : TET->int_params()) - TypeVals.push_back(IntParam); + llvm::append_range(TypeVals, TET->int_params()); break; } case Type::TypedPointerTyID: @@ -4303,10 +4302,8 @@ static void writeFunctionHeapProfileRecords( } for (auto Id : CI.StackIdIndices) Record.push_back(GetStackIndex(Id)); - if (!PerModule) { - for (auto V : CI.Clones) - Record.push_back(V); - } + if (!PerModule) + llvm::append_range(Record, CI.Clones); Stream.EmitRecord(PerModule ? bitc::FS_PERMODULE_CALLSITE_INFO : bitc::FS_COMBINED_CALLSITE_INFO, Record, CallsiteAbbrev); @@ -4326,10 +4323,8 @@ static void writeFunctionHeapProfileRecords( assert(CallStackCount <= CallStackPos.size()); Record.push_back(CallStackPos[CallStackCount++]); } - if (!PerModule) { - for (auto V : AI.Versions) - Record.push_back(V); - } + if (!PerModule) + llvm::append_range(Record, AI.Versions); assert(AI.ContextSizeInfos.empty() || AI.ContextSizeInfos.size() == AI.MIBs.size()); // Optionally emit the context size information if it exists. -- cgit v1.2.3