Skip to content

Commit

Permalink
[NFC][Clang] Make GetSDLFromOffloadArchive and SDLSearch static (#70201)
Browse files Browse the repository at this point in the history
Make GetSDLFromOffloadArchive and SDLSearch functions static since they
are used only in the file where they are defined. The aim is to ease
refactoring/modifying the declarations of these functions in the future.
  • Loading branch information
Juan Manuel Martinez Caamaño committed Oct 25, 2023
1 parent 078ae8c commit 6c0ceae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
4 changes: 2 additions & 2 deletions clang/lib/Driver/ToolChains/CommonArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,7 @@ void tools::addX86AlignBranchArgs(const Driver &D, const ArgList &Args,
/// convention has been to use the prefix “lib”. To avoid confusion with host
/// archive libraries, we use prefix "libbc-" for the bitcode SDL archives.
///
bool tools::SDLSearch(const Driver &D, const llvm::opt::ArgList &DriverArgs,
static bool SDLSearch(const Driver &D, const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args,
SmallVector<std::string, 8> LibraryPaths, std::string Lib,
StringRef Arch, StringRef Target, bool isBitCodeSDL) {
Expand Down Expand Up @@ -2128,7 +2128,7 @@ bool tools::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.
bool tools::GetSDLFromOffloadArchive(
static bool GetSDLFromOffloadArchive(
Compilation &C, const Driver &D, const Tool &T, const JobAction &JA,
const InputInfoList &Inputs, const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args, SmallVector<std::string, 8> LibraryPaths,
Expand Down
13 changes: 0 additions & 13 deletions clang/lib/Driver/ToolChains/CommonArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,6 @@ void AddStaticDeviceLibs(Compilation *C, const Tool *T, const JobAction *JA,
llvm::opt::ArgStringList &CmdArgs, StringRef Arch,
StringRef Target, bool isBitCodeSDL);

bool SDLSearch(const Driver &D, const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CmdArgs,
SmallVector<std::string, 8> LibraryPaths, std::string Lib,
StringRef Arch, StringRef Target, bool isBitCodeSDL);

bool GetSDLFromOffloadArchive(Compilation &C, const Driver &D, const Tool &T,
const JobAction &JA, const InputInfoList &Inputs,
const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args,
SmallVector<std::string, 8> LibraryPaths,
StringRef Lib, StringRef Arch, StringRef Target,
bool isBitCodeSDL);

const char *SplitDebugName(const JobAction &JA, const llvm::opt::ArgList &Args,
const InputInfo &Input, const InputInfo &Output);

Expand Down

0 comments on commit 6c0ceae

Please sign in to comment.