Skip to content

Commit 92e9bc0

Browse files
Address final comments on patch.
1 parent a02510e commit 92e9bc0

File tree

4 files changed

+5
-20
lines changed

4 files changed

+5
-20
lines changed

clang/include/clang/Basic/CodeGenOptions.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ CODEGENOPT(HIPCorrectlyRoundedDivSqrt, 1, 1) ///< -fno-hip-fp32-correctly-rounde
197197
CODEGENOPT(HIPSaveKernelArgName, 1, 0) ///< Set when -fhip-kernel-arg-name is enabled.
198198
CODEGENOPT(UniqueInternalLinkageNames, 1, 0) ///< Internal Linkage symbols get unique names.
199199
CODEGENOPT(SplitMachineFunctions, 1, 0) ///< Split machine functions using profile information.
200-
CODEGENOPT(PPCUseFullRegisterNames, 1, 0) ///< Print full register names in assembly -mregnames
200+
CODEGENOPT(PPCUseFullRegisterNames, 1, 0) ///< Print full register names in assembly
201201

202202
/// When false, this attempts to generate code as if the result of an
203203
/// overflowing conversion matches the overflowing behavior of a target's native

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5015,10 +5015,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
50155015
}
50165016

50175017
if (Triple.isPPC())
5018-
if (const Arg *A =
5019-
Args.getLastArg(options::OPT_mregnames, options::OPT_mno_regnames))
5020-
if (A->getOption().matches(options::OPT_mregnames))
5021-
Args.AddLastArg(CmdArgs, options::OPT_mregnames);
5018+
Args.addOptInFlag(CmdArgs, options::OPT_mregnames,
5019+
options::OPT_mno_regnames);
50225020

50235021
if (Args.getLastArg(options::OPT_fthin_link_bitcode_EQ))
50245022
Args.AddLastArg(CmdArgs, options::OPT_fthin_link_bitcode_EQ);

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,9 +1780,6 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
17801780
Opts.setDebugInfo(llvm::codegenoptions::LimitedDebugInfo);
17811781
}
17821782

1783-
if (const Arg *A = Args.getLastArg(OPT_mregnames))
1784-
Opts.PPCUseFullRegisterNames = true;
1785-
17861783
for (const auto &Arg : Args.getAllArgValues(OPT_fdebug_prefix_map_EQ)) {
17871784
auto Split = StringRef(Arg).split('=');
17881785
Opts.DebugPrefixMap.emplace_back(Split.first, Split.second);
Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
// REQUIRES: powerpc-registered-target
2-
// RUN: %clang -### -target powerpc-ibm-aix-xcoff -mcpu=pwr8 -O3 -mregnames \
2+
// RUN: %clang -### -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -mregnames \
33
// RUN: %s 2>&1 >/dev/null | FileCheck %s --check-prefix=FULLNAMES
4-
// RUN: %clang -### -target powerpc64-ibm-aix-xcoff -mcpu=pwr8 -O3 -mregnames \
5-
// RUN: %s 2>&1 >/dev/null | FileCheck %s --check-prefix=FULLNAMES
6-
// RUN: %clang -### -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -O3 -mregnames \
7-
// RUN: %s 2>&1 >/dev/null | FileCheck %s --check-prefix=FULLNAMES
8-
// RUN: %clang -### -target powerpc-ibm-aix-xcoff -mcpu=pwr8 -O3 -mno-regnames \
9-
// RUN: %s 2>&1 >/dev/null | FileCheck %s --check-prefix=NOFULLNAMES
10-
// RUN: %clang -### -target powerpc64-ibm-aix-xcoff -mcpu=pwr8 -O3 -mno-regnames \
11-
// RUN: %s 2>&1 >/dev/null | FileCheck %s --check-prefix=NOFULLNAMES
12-
// RUN: %clang -### -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -O3 -mno-regnames \
4+
// RUN: %clang -### -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -mno-regnames \
135
// RUN: %s 2>&1 >/dev/null | FileCheck %s --check-prefix=NOFULLNAMES
146

157
// FULLNAMES: -mregnames
168
// NOFULLNAMES-NOT: -mregnames
17-
18-

0 commit comments

Comments
 (0)