Skip to content

Commit 6c0ceae

Browse files
authored
[NFC][Clang] Make GetSDLFromOffloadArchive and SDLSearch static (#70201)
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.
1 parent 078ae8c commit 6c0ceae

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

clang/lib/Driver/ToolChains/CommonArgs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,7 +2051,7 @@ void tools::addX86AlignBranchArgs(const Driver &D, const ArgList &Args,
20512051
/// convention has been to use the prefix “lib”. To avoid confusion with host
20522052
/// archive libraries, we use prefix "libbc-" for the bitcode SDL archives.
20532053
///
2054-
bool tools::SDLSearch(const Driver &D, const llvm::opt::ArgList &DriverArgs,
2054+
static bool SDLSearch(const Driver &D, const llvm::opt::ArgList &DriverArgs,
20552055
llvm::opt::ArgStringList &CC1Args,
20562056
SmallVector<std::string, 8> LibraryPaths, std::string Lib,
20572057
StringRef Arch, StringRef Target, bool isBitCodeSDL) {
@@ -2128,7 +2128,7 @@ bool tools::SDLSearch(const Driver &D, const llvm::opt::ArgList &DriverArgs,
21282128
/// the library paths. If so, add a new command to clang-offload-bundler to
21292129
/// unbundle this archive and create a temporary device specific archive. Name
21302130
/// of this SDL is passed to the llvm-link tool.
2131-
bool tools::GetSDLFromOffloadArchive(
2131+
static bool GetSDLFromOffloadArchive(
21322132
Compilation &C, const Driver &D, const Tool &T, const JobAction &JA,
21332133
const InputInfoList &Inputs, const llvm::opt::ArgList &DriverArgs,
21342134
llvm::opt::ArgStringList &CC1Args, SmallVector<std::string, 8> LibraryPaths,

clang/lib/Driver/ToolChains/CommonArgs.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,6 @@ void AddStaticDeviceLibs(Compilation *C, const Tool *T, const JobAction *JA,
6666
llvm::opt::ArgStringList &CmdArgs, StringRef Arch,
6767
StringRef Target, bool isBitCodeSDL);
6868

69-
bool SDLSearch(const Driver &D, const llvm::opt::ArgList &DriverArgs,
70-
llvm::opt::ArgStringList &CmdArgs,
71-
SmallVector<std::string, 8> LibraryPaths, std::string Lib,
72-
StringRef Arch, StringRef Target, bool isBitCodeSDL);
73-
74-
bool GetSDLFromOffloadArchive(Compilation &C, const Driver &D, const Tool &T,
75-
const JobAction &JA, const InputInfoList &Inputs,
76-
const llvm::opt::ArgList &DriverArgs,
77-
llvm::opt::ArgStringList &CC1Args,
78-
SmallVector<std::string, 8> LibraryPaths,
79-
StringRef Lib, StringRef Arch, StringRef Target,
80-
bool isBitCodeSDL);
81-
8269
const char *SplitDebugName(const JobAction &JA, const llvm::opt::ArgList &Args,
8370
const InputInfo &Input, const InputInfo &Output);
8471

0 commit comments

Comments
 (0)