diff options
author | Kazu Hirata <kazu@google.com> | 2025-05-10 13:00:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-10 13:00:47 -0700 |
commit | 58014a506dd35df3f24320cf295945ad033d0e8c (patch) | |
tree | fc8be33c5f8bfec3272f86978e96603a747ab379 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | f5f8ddc166b1909623f19dc134d18a4320ec485b (diff) | |
download | llvm-58014a506dd35df3f24320cf295945ad033d0e8c.zip llvm-58014a506dd35df3f24320cf295945ad033d0e8c.tar.gz llvm-58014a506dd35df3f24320cf295945ad033d0e8c.tar.bz2 |
[IR] Teach getConstraintString to return StringRef (NFC) (#139401)
With this change, some callers get to use StringRef::starts_with.
I'm planning to teach getAsmString to return StringRef also, but
I'ld like to keep that separate from this patch.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index ef39787..158b0a6 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -2805,7 +2805,7 @@ void ModuleBitcodeWriter::writeConstants(unsigned FirstVal, unsigned LastVal, Record.append(AsmStr.begin(), AsmStr.end()); // Add the constraint string. - const std::string &ConstraintStr = IA->getConstraintString(); + StringRef ConstraintStr = IA->getConstraintString(); Record.push_back(ConstraintStr.size()); Record.append(ConstraintStr.begin(), ConstraintStr.end()); Stream.EmitRecord(bitc::CST_CODE_INLINEASM, Record); |