diff options
| author | Kazu Hirata <kazu@google.com> | 2025-05-20 00:03:48 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-20 00:03:48 -0700 |
| commit | f8e2e709f079f5aafc9d8cd67ee9401910d43fc1 (patch) | |
| tree | 9b6af0c9d4db30fa15944f91896ae9d93e44d275 /llvm/lib/CGData/StableFunctionMapRecord.cpp | |
| parent | 0baacd1a58420f7e4da14faa1f0e9a21d5294a6a (diff) | |
[CGData] Return ArrayRef<std::string> in getNames (NFC) (#140675)
All uses of getNames is read access to the list of names, so we can
just return ArrayRef<std::string>. There is no need to make a copy as
we prepare a return value.
---------
Co-authored-by: Matt Arsenault <arsenm2@gmail.com>
Diffstat (limited to 'llvm/lib/CGData/StableFunctionMapRecord.cpp')
| -rw-r--r-- | llvm/lib/CGData/StableFunctionMapRecord.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CGData/StableFunctionMapRecord.cpp b/llvm/lib/CGData/StableFunctionMapRecord.cpp index e23b0e072c9a..537793b9e2b4 100644 --- a/llvm/lib/CGData/StableFunctionMapRecord.cpp +++ b/llvm/lib/CGData/StableFunctionMapRecord.cpp @@ -86,7 +86,7 @@ void StableFunctionMapRecord::serialize(raw_ostream &OS, support::endian::Writer Writer(OS, endianness::little); // Write Names. - auto &Names = FunctionMap->getNames(); + ArrayRef<std::string> Names = FunctionMap->getNames(); uint32_t ByteSize = 4; Writer.write<uint32_t>(Names.size()); for (auto &Name : Names) { |
