aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LTO/LTOBackend.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2024-05-19 22:48:06 -0700
committerGitHub <noreply@github.com>2024-05-19 22:48:06 -0700
commit32ae9a28a54f59f2b4e2f32323f53fb107ea1f85 (patch)
tree7fc3f353c8f22d448f8e47f73a41769e03cd67c6 /llvm/lib/LTO/LTOBackend.cpp
parent6b0733e3a35350679ea9c6056ecd28652d99017f (diff)
downloadllvm-32ae9a28a54f59f2b4e2f32323f53fb107ea1f85.zip
llvm-32ae9a28a54f59f2b4e2f32323f53fb107ea1f85.tar.gz
llvm-32ae9a28a54f59f2b4e2f32323f53fb107ea1f85.tar.bz2
[llvm] Use SmallString::str (NFC) (#92712)
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index d4b89ed..21aed79 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -452,9 +452,8 @@ static void splitCodeGen(const Config &C, TargetMachine *TM,
CodegenThreadPool.async(
[&](const SmallString<0> &BC, unsigned ThreadId) {
LTOLLVMContext Ctx(C);
- Expected<std::unique_ptr<Module>> MOrErr = parseBitcodeFile(
- MemoryBufferRef(StringRef(BC.data(), BC.size()), "ld-temp.o"),
- Ctx);
+ Expected<std::unique_ptr<Module>> MOrErr =
+ parseBitcodeFile(MemoryBufferRef(BC.str(), "ld-temp.o"), Ctx);
if (!MOrErr)
report_fatal_error("Failed to read bitcode");
std::unique_ptr<Module> MPartInCtx = std::move(MOrErr.get());