Skip to content

Commit

Permalink
[Driver][NFC] A bit more const for OpenBSD and DragonFly
Browse files Browse the repository at this point in the history
  • Loading branch information
brad0 committed Nov 16, 2023
1 parent 7ff8094 commit 49795d2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions clang/lib/Driver/ToolChains/DragonFly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ void dragonfly::Linker::ConstructJob(Compilation &C, const JobAction &JA,
const auto &ToolChain = static_cast<const DragonFly &>(getToolChain());
const Driver &D = ToolChain.getDriver();
const llvm::Triple::ArchType Arch = ToolChain.getArch();
const bool Static = Args.hasArg(options::OPT_static);
const bool Shared = Args.hasArg(options::OPT_shared);
const bool Profiling = Args.hasArg(options::OPT_pg);
const bool Pie = Args.hasArg(options::OPT_pie);
ArgStringList CmdArgs;
bool Static = Args.hasArg(options::OPT_static);
bool Shared = Args.hasArg(options::OPT_shared);
bool Profiling = Args.hasArg(options::OPT_pg);
bool Pie = Args.hasArg(options::OPT_pie);

if (!D.SysRoot.empty())
CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
Expand Down
14 changes: 7 additions & 7 deletions clang/lib/Driver/ToolChains/OpenBSD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ void openbsd::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
const auto &ToolChain = static_cast<const OpenBSD &>(getToolChain());
const Driver &D = ToolChain.getDriver();
const llvm::Triple &Triple = ToolChain.getTriple();
ArgStringList CmdArgs;

claimNoWarnArgs(Args);
ArgStringList CmdArgs;

switch (ToolChain.getArch()) {
case llvm::Triple::x86:
Expand Down Expand Up @@ -112,13 +112,13 @@ void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
const auto &ToolChain = static_cast<const OpenBSD &>(getToolChain());
const Driver &D = ToolChain.getDriver();
const llvm::Triple::ArchType Arch = ToolChain.getArch();
ArgStringList CmdArgs;
bool Static = Args.hasArg(options::OPT_static);
bool Shared = Args.hasArg(options::OPT_shared);
bool Profiling = Args.hasArg(options::OPT_pg);
bool Pie = Args.hasArg(options::OPT_pie);
bool Nopie = Args.hasArg(options::OPT_nopie);
const bool Static = Args.hasArg(options::OPT_static);
const bool Shared = Args.hasArg(options::OPT_shared);
const bool Profiling = Args.hasArg(options::OPT_pg);
const bool Pie = Args.hasArg(options::OPT_pie);
const bool Nopie = Args.hasArg(options::OPT_nopie);
const bool Relocatable = Args.hasArg(options::OPT_r);
ArgStringList CmdArgs;

// Silence warning for "clang -g foo.o -o foo"
Args.ClaimAllArgs(options::OPT_g_Group);
Expand Down

0 comments on commit 49795d2

Please sign in to comment.