Skip to content

Commit 53e5047

Browse files
authored
[Clang][NFC] Move FatbinFileName instead of copy (#143827)
Static analysis flagged FatbinFileName since we can move it instead of copying it.
1 parent 217304a commit 53e5047

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Interpreter/DeviceOffload.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ llvm::Error IncrementalCUDADeviceParser::GenerateFatbinary() {
151151
llvm::StringRef(FatbinContent.data(), FatbinContent.size()),
152152
"", false));
153153

154-
CodeGenOpts.CudaGpuBinaryFileName = FatbinFileName;
154+
CodeGenOpts.CudaGpuBinaryFileName = std::move(FatbinFileName);
155155

156156
FatbinContent.clear();
157157

0 commit comments

Comments
 (0)