diff options
author | Brad Smith <brad@comstyle.com> | 2023-11-15 19:32:40 -0500 |
---|---|---|
committer | Brad Smith <brad@comstyle.com> | 2023-11-15 19:36:56 -0500 |
commit | 49795d27761b9f398302354acd30980a319b1502 (patch) | |
tree | 9ea42a9413429b2e39dfe85c7a894d59b33e5214 /clang | |
parent | 7ff8094a397127c8204c34079f8893fc8acbf1dd (diff) | |
download | llvm-49795d27761b9f398302354acd30980a319b1502.zip llvm-49795d27761b9f398302354acd30980a319b1502.tar.gz llvm-49795d27761b9f398302354acd30980a319b1502.tar.bz2 |
[Driver][NFC] A bit more const for OpenBSD and DragonFly
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/Driver/ToolChains/DragonFly.cpp | 8 | ||||
-rw-r--r-- | clang/lib/Driver/ToolChains/OpenBSD.cpp | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/clang/lib/Driver/ToolChains/DragonFly.cpp b/clang/lib/Driver/ToolChains/DragonFly.cpp index b13449b..9942fc6 100644 --- a/clang/lib/Driver/ToolChains/DragonFly.cpp +++ b/clang/lib/Driver/ToolChains/DragonFly.cpp @@ -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)); diff --git a/clang/lib/Driver/ToolChains/OpenBSD.cpp b/clang/lib/Driver/ToolChains/OpenBSD.cpp index 5d06cd8..c8f0216 100644 --- a/clang/lib/Driver/ToolChains/OpenBSD.cpp +++ b/clang/lib/Driver/ToolChains/OpenBSD.cpp @@ -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: @@ -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); |