[clang] [Clang][SYCL] Fix use of uninitalized memory in temp files (PR #114488)
Nick Sarnie via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 31 16:23:52 PDT 2024
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/114488
This fixes the current sanitizer CI failures. I manually confirmed the fix with a MemorySanitizer build.
>From 51227ad50bff12eff5a4f835686f13d2444848ea Mon Sep 17 00:00:00 2001
From: "Sarnie, Nick" <nick.sarnie at intel.com>
Date: Thu, 31 Oct 2024 16:22:33 -0700
Subject: [PATCH] [Clang][SYCL] Fix use of uninitalized memory in temp files
Signed-off-by: Sarnie, Nick <nick.sarnie at intel.com>
---
clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
index 0639b95c76e218..076458a275d986 100644
--- a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
+++ b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
@@ -230,7 +230,7 @@ Expected<StringRef> linkDeviceInputFiles(ArrayRef<std::string> InputFiles,
CmdArgs.push_back("--suppress-warnings");
if (Error Err = executeCommands(*LLVMLinkPath, CmdArgs))
return std::move(Err);
- return *OutFileOrErr;
+ return Args.MakeArgString(*OutFileOrErr);
}
// This utility function is used to gather all SYCL device library files that
More information about the cfe-commits
mailing list