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/Reader/BitcodeReader.cpp | |
| parent | f5f8ddc166b1909623f19dc134d18a4320ec485b (diff) | |
[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/Reader/BitcodeReader.cpp')
| -rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index a7fbb0c74cb1..1e07f060d72c 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -6022,7 +6022,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) { FunctionType::get(FTy->getReturnType(), ArgTys, FTy->isVarArg()); // Update constraint string to use label constraints. - std::string Constraints = IA->getConstraintString(); + std::string Constraints = IA->getConstraintString().str(); unsigned ArgNo = 0; size_t Pos = 0; for (const auto &CI : ConstraintInfo) { |
