diff options
author | Kazu Hirata <kazu@google.com> | 2025-03-30 18:43:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-30 18:43:02 -0700 |
commit | 6257621f41d1deb31cfbfcee993a75991a0bca13 (patch) | |
tree | 1a63b0df7bdb26cabffdbaf126029e9e9ae14b59 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 94122d58fc77079a291a3d008914006cb509d9db (diff) | |
download | llvm-6257621f41d1deb31cfbfcee993a75991a0bca13.zip llvm-6257621f41d1deb31cfbfcee993a75991a0bca13.tar.gz llvm-6257621f41d1deb31cfbfcee993a75991a0bca13.tar.bz2 |
[llvm] Use llvm::append_range (NFC) (#133658)
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 34ba25d..4941109 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. |