aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-05-10 22:59:09 -0700
committerGitHub <noreply@github.com>2025-05-10 22:59:09 -0700
commit50e949f3cc47ccae531f91d5126a313ccbd039ed (patch)
tree317de71a3eaa6699b2c0b08df8620d909f5ebfed /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent2a0e8863d403c8e8c92340ddf073b74de6a49e83 (diff)
downloadllvm-50e949f3cc47ccae531f91d5126a313ccbd039ed.zip
llvm-50e949f3cc47ccae531f91d5126a313ccbd039ed.tar.gz
llvm-50e949f3cc47ccae531f91d5126a313ccbd039ed.tar.bz2
[IR] Teach getAsmString to return StringRef (NFC) (#139406)
This is for consistency with #139401.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 158b0a6..658fd3f 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -2800,7 +2800,7 @@ void ModuleBitcodeWriter::writeConstants(unsigned FirstVal, unsigned LastVal,
unsigned(IA->getDialect() & 1) << 2 | unsigned(IA->canThrow()) << 3);
// Add the asm string.
- const std::string &AsmStr = IA->getAsmString();
+ StringRef AsmStr = IA->getAsmString();
Record.push_back(AsmStr.size());
Record.append(AsmStr.begin(), AsmStr.end());