[clang] f039437 - git clang-format HEAD~
Nick Desaulniers via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 26 14:25:50 PDT 2022
Author: Nick Desaulniers
Date: 2022-10-26T14:24:30-07:00
New Revision: f03943722ba5a9fb2a0f23eb158ad469428b8876
URL: https://github.com/llvm/llvm-project/commit/f03943722ba5a9fb2a0f23eb158ad469428b8876
DIFF: https://github.com/llvm/llvm-project/commit/f03943722ba5a9fb2a0f23eb158ad469428b8876.diff
LOG: git clang-format HEAD~
for
commit ad78ce44bb47 ("[clang][Toolchains][Gnu] pass -gdwarf-* through to
assembler")
Added:
Modified:
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/lib/Driver/ToolChains/Gnu.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
index 8f743c918109c..3feb1a2a63af3 100644
--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -1537,34 +1537,32 @@ static unsigned ParseDebugDefaultVersion(const ToolChain &TC,
unsigned tools::DwarfVersionNum(StringRef ArgValue) {
return llvm::StringSwitch<unsigned>(ArgValue)
- .Case("-gdwarf-2", 2)
- .Case("-gdwarf-3", 3)
- .Case("-gdwarf-4", 4)
- .Case("-gdwarf-5", 5)
- .Default(0);
+ .Case("-gdwarf-2", 2)
+ .Case("-gdwarf-3", 3)
+ .Case("-gdwarf-4", 4)
+ .Case("-gdwarf-5", 5)
+ .Default(0);
}
const Arg *tools::getDwarfNArg(const ArgList &Args) {
return Args.getLastArg(options::OPT_gdwarf_2, options::OPT_gdwarf_3,
- options::OPT_gdwarf_4, options::OPT_gdwarf_5,
- options::OPT_gdwarf);
+ options::OPT_gdwarf_4, options::OPT_gdwarf_5,
+ options::OPT_gdwarf);
}
unsigned tools::getDwarfVersion(const ToolChain &TC,
- const llvm::opt::ArgList &Args) {
+ const llvm::opt::ArgList &Args) {
unsigned DwarfVersion = ParseDebugDefaultVersion(TC, Args);
- if (const Arg* GDwarfN = getDwarfNArg(Args))
+ if (const Arg *GDwarfN = getDwarfNArg(Args))
if (int N = DwarfVersionNum(GDwarfN->getSpelling()))
DwarfVersion = N;
if (DwarfVersion == 0) {
DwarfVersion = TC.GetDefaultDwarfVersion();
- assert(DwarfVersion &&
- "toolchain default DWARF version must be nonzero");
+ assert(DwarfVersion && "toolchain default DWARF version must be nonzero");
}
return DwarfVersion;
}
-
void tools::AddAssemblerKPIC(const ToolChain &ToolChain, const ArgList &Args,
ArgStringList &CmdArgs) {
llvm::Reloc::Model RelocationModel;
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index ea19e7af41bd4..e592b7394d0b2 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -971,8 +971,9 @@ void tools::gnutools::Assembler::ConstructJob(Compilation &C,
CmdArgs.push_back(II.getFilename());
if (Arg *A = Args.getLastArg(options::OPT_g_Flag, options::OPT_gN_Group,
- options::OPT_gdwarf_2, options::OPT_gdwarf_3, options::OPT_gdwarf_4,
- options::OPT_gdwarf_5, options::OPT_gdwarf))
+ options::OPT_gdwarf_2, options::OPT_gdwarf_3,
+ options::OPT_gdwarf_4, options::OPT_gdwarf_5,
+ options::OPT_gdwarf))
if (!A->getOption().matches(options::OPT_g0)) {
Args.AddLastArg(CmdArgs, options::OPT_g_Flag);
More information about the cfe-commits
mailing list