Skip to content

Commit c0c91aa

Browse files
authored
[clang-linker-wrapper][NFC] Apply clang-tidy checks (#16893)
1 parent 01bc7c2 commit c0c91aa

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,13 @@
4747
#include "llvm/Support/Errc.h"
4848
#include "llvm/Support/FileOutputBuffer.h"
4949
#include "llvm/Support/FileSystem.h"
50-
#include "llvm/Support/FileUtilities.h"
5150
#include "llvm/Support/InitLLVM.h"
5251
#include "llvm/Support/LineIterator.h"
5352
#include "llvm/Support/MemoryBuffer.h"
5453
#include "llvm/Support/Parallel.h"
5554
#include "llvm/Support/Path.h"
5655
#include "llvm/Support/Program.h"
5756
#include "llvm/Support/Signals.h"
58-
#include "llvm/Support/SimpleTable.h"
5957
#include "llvm/Support/SourceMgr.h"
6058
#include "llvm/Support/StringSaver.h"
6159
#include "llvm/Support/TargetSelect.h"
@@ -156,7 +154,7 @@ static std::optional<llvm::module_split::IRSplitMode> SYCLModuleSplitMode;
156154

157155
static bool UseSYCLPostLinkTool;
158156

159-
SmallString<128> SPIRVDumpDir;
157+
static SmallString<128> SPIRVDumpDir;
160158

161159
using OffloadingImage = OffloadBinary::OffloadingImage;
162160

@@ -1480,7 +1478,7 @@ Error extractBundledObjects(StringRef Filename, const ArgList &Args,
14801478
if (Magic == file_magic::spirv_object)
14811479
return createStringError(
14821480
"SPIR-V fat objects must be generated with --offload-new-driver");
1483-
auto Arg = Args.MakeArgString(
1481+
const auto *Arg = Args.MakeArgString(
14841482
"sycl-" +
14851483
(Triple.isSPIROrSPIRV() ? Triple.str() + "-" : Triple.str()) + "=" +
14861484
ObjectFilePath);
@@ -2237,7 +2235,7 @@ DerivedArgList getLinkerArgs(ArrayRef<OffloadFile> Input,
22372235
DAL.AddJoinedArg(nullptr, Tbl.getOption(OPT_triple_EQ),
22382236
Args.MakeArgString(Input.front().getBinary()->getTriple()));
22392237

2240-
auto Bin = Input.front().getBinary();
2238+
const auto *Bin = Input.front().getBinary();
22412239
DAL.AddJoinedArg(
22422240
nullptr, Tbl.getOption(OPT_sycl_backend_compile_options_from_image_EQ),
22432241
Args.MakeArgString(Bin->getString(COMPILE_OPTS)));

0 commit comments

Comments
 (0)