Author: Kazu Hirata Date: 2025-04-01T10:35:50-07:00 New Revision: 9586117c3ab6f16883a646847cfa65b065ad4ae3
URL: https://github.com/llvm/llvm-project/commit/9586117c3ab6f16883a646847cfa65b065ad4ae3 DIFF: https://github.com/llvm/llvm-project/commit/9586117c3ab6f16883a646847cfa65b065ad4ae3.diff LOG: [clang-sycl-linker] Fix a warning This patch fixes: clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp:127:13: error: function 'getMainExecutable' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] Added: Modified: clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp Removed: ################################################################################ diff --git a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp index 8dd0394e9610e..f4a16549340a1 100644 --- a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp +++ b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp @@ -124,12 +124,6 @@ const OptTable &getOptTable() { exit(EXIT_FAILURE); } -std::string getMainExecutable(const char *Name) { - void *Ptr = (void *)(intptr_t)&getMainExecutable; - auto COWPath = sys::fs::getMainExecutable(Name, Ptr); - return sys::path::parent_path(COWPath).str(); -} - Expected<StringRef> createTempFile(const ArgList &Args, const Twine &Prefix, StringRef Extension) { SmallString<128> OutputFile; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits