[clang] 6687c57 - [NFC][Clang] Make GetSDLFromOffloadArchive return void
Juan Manuel MARTINEZ CAAMAÑO via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 25 06:58:28 PDT 2023
Author: Juan Manuel MARTINEZ CAAMAÑO
Date: 2023-10-25T15:57:22+02:00
New Revision: 6687c5725cd51ff5c69a8ed90dceaf86c361ae6d
URL: https://github.com/llvm/llvm-project/commit/6687c5725cd51ff5c69a8ed90dceaf86c361ae6d
DIFF: https://github.com/llvm/llvm-project/commit/6687c5725cd51ff5c69a8ed90dceaf86c361ae6d.diff
LOG: [NFC][Clang] Make GetSDLFromOffloadArchive return void
Added:
Modified:
clang/lib/Driver/ToolChains/CommonArgs.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
index 3b3d77fd930a938..ad012d3d0d4b46f 100644
--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -2129,7 +2129,7 @@ static bool SDLSearch(const Driver &D, const llvm::opt::ArgList &DriverArgs,
/// the library paths. If so, add a new command to clang-offload-bundler to
/// unbundle this archive and create a temporary device specific archive. Name
/// of this SDL is passed to the llvm-link tool.
-static bool GetSDLFromOffloadArchive(
+static void GetSDLFromOffloadArchive(
Compilation &C, const Driver &D, const Tool &T, const JobAction &JA,
const InputInfoList &Inputs, const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args,
@@ -2138,7 +2138,7 @@ static bool GetSDLFromOffloadArchive(
// We don't support bitcode archive bundles for nvptx
if (isBitCodeSDL && Arch.contains("nvptx"))
- return false;
+ return;
bool FoundAOB = false;
std::string ArchiveOfBundles;
@@ -2174,12 +2174,12 @@ static bool GetSDLFromOffloadArchive(
}
if (!FoundAOB)
- return false;
+ return;
llvm::file_magic Magic;
auto EC = llvm::identify_magic(ArchiveOfBundles, Magic);
if (EC || Magic != llvm::file_magic::archive)
- return false;
+ return;
StringRef Prefix = isBitCodeSDL ? "libbc-" : "lib";
std::string OutputLib =
@@ -2234,7 +2234,7 @@ static bool GetSDLFromOffloadArchive(
CC1Args.push_back(DriverArgs.MakeArgString(OutputLib));
- return true;
+ return;
}
// Wrapper function used by driver for adding SDLs during link phase.
More information about the cfe-commits
mailing list