From 58014a506dd35df3f24320cf295945ad033d0e8c Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 10 May 2025 13:00:47 -0700 Subject: [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. --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') 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) { -- cgit v1.1