[clang] 53e5047 - [Clang][NFC] Move FatbinFileName instead of copy (#143827)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 12 10:09:05 PDT 2025
Author: Shafik Yaghmour
Date: 2025-06-12T10:09:02-07:00
New Revision: 53e50472ff445bb946a53aba30649ae65f3534b1
URL: https://github.com/llvm/llvm-project/commit/53e50472ff445bb946a53aba30649ae65f3534b1
DIFF: https://github.com/llvm/llvm-project/commit/53e50472ff445bb946a53aba30649ae65f3534b1.diff
LOG: [Clang][NFC] Move FatbinFileName instead of copy (#143827)
Static analysis flagged FatbinFileName since we can move it instead of
copying it.
Added:
Modified:
clang/lib/Interpreter/DeviceOffload.cpp
Removed:
################################################################################
diff --git a/clang/lib/Interpreter/DeviceOffload.cpp b/clang/lib/Interpreter/DeviceOffload.cpp
index 05625ddedb72f..9a25a264b2d5c 100644
--- a/clang/lib/Interpreter/DeviceOffload.cpp
+++ b/clang/lib/Interpreter/DeviceOffload.cpp
@@ -151,7 +151,7 @@ llvm::Error IncrementalCUDADeviceParser::GenerateFatbinary() {
llvm::StringRef(FatbinContent.data(), FatbinContent.size()),
"", false));
- CodeGenOpts.CudaGpuBinaryFileName = FatbinFileName;
+ CodeGenOpts.CudaGpuBinaryFileName = std::move(FatbinFileName);
FatbinContent.clear();
More information about the cfe-commits
mailing list