aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-05-10 13:00:47 -0700
committerGitHub <noreply@github.com>2025-05-10 13:00:47 -0700
commit58014a506dd35df3f24320cf295945ad033d0e8c (patch)
treefc8be33c5f8bfec3272f86978e96603a747ab379 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentf5f8ddc166b1909623f19dc134d18a4320ec485b (diff)
downloadllvm-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/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index a7fbb0c..1e07f06 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) {