Skip to content

Commit bde2357

Browse files
authored
[LLVM][TableGen] Rename Option emitter files (#109216)
Rename OptXXXEmitter.cpp to OptionXXXEmitter.cpp to have a less ambiguous name, as `Opt` could also mean optimization.
1 parent 4494c54 commit bde2357

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

llvm/include/llvm/Option/OptTable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class OptTable {
6464
// the program, HelpText is used instead. This cannot use std::vector
6565
// because OptTable is used in constexpr contexts. Increase the array sizes
6666
// here if you need more entries and adjust the constants in
67-
// OptParserEmitter::EmitHelpTextsForVariants.
67+
// OptionParserEmitter::EmitHelpTextsForVariants.
6868
std::array<std::pair<std::array<unsigned int, 2 /*MaxVisibilityPerHelp*/>,
6969
const char *>,
7070
1 /*MaxVisibilityHelp*/>

llvm/unittests/Option/OptionMarshallingTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===- unittest/Support/OptionMarshallingTest.cpp - OptParserEmitter tests ===//
1+
//===- OptionMarshallingTest.cpp - OptionParserEmitter tests -================//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

llvm/utils/TableGen/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ add_tablegen(llvm-tblgen LLVM
5959
InstrInfoEmitter.cpp
6060
IntrinsicEmitter.cpp
6161
MacroFusionPredicatorEmitter.cpp
62-
OptParserEmitter.cpp
63-
OptRSTEmitter.cpp
62+
OptionParserEmitter.cpp
63+
OptionRSTEmitter.cpp
6464
PseudoLoweringEmitter.cpp
6565
RegisterBankEmitter.cpp
6666
RegisterInfoEmitter.cpp

llvm/utils/TableGen/OptParserEmitter.cpp renamed to llvm/utils/TableGen/OptionParserEmitter.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===- OptParserEmitter.cpp - Table Driven Command Line Parsing -----------===//
1+
//===- OptionParserEmitter.cpp - Table Driven Command Option Line Parsing -===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -247,10 +247,10 @@ static void EmitHelpTextsForVariants(
247247
OS << " }})";
248248
}
249249

250-
/// OptParserEmitter - This tablegen backend takes an input .td file
250+
/// OptionParserEmitter - This tablegen backend takes an input .td file
251251
/// describing a list of options and emits a data structure for parsing and
252252
/// working with those options when given an input command line.
253-
static void EmitOptParser(const RecordKeeper &Records, raw_ostream &OS) {
253+
static void EmitOptionParser(const RecordKeeper &Records, raw_ostream &OS) {
254254
// Get the option groups and options.
255255
ArrayRef<const Record *> Groups =
256256
Records.getAllDerivedDefinitions("OptionGroup");
@@ -572,5 +572,5 @@ static void EmitOptParser(const RecordKeeper &Records, raw_ostream &OS) {
572572
OS << "\n";
573573
}
574574

575-
static TableGen::Emitter::Opt X("gen-opt-parser-defs", EmitOptParser,
575+
static TableGen::Emitter::Opt X("gen-opt-parser-defs", EmitOptionParser,
576576
"Generate option definitions");

llvm/utils/TableGen/OptRSTEmitter.cpp renamed to llvm/utils/TableGen/OptionRSTEmitter.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===- OptParserEmitter.cpp - Table Driven Command Line Parsing -----------===//
1+
//===- OptionRSTEmitter.cpp - Table Driven Command Line Option Parsing ----===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -14,9 +14,9 @@
1414

1515
using namespace llvm;
1616

17-
/// OptParserEmitter - This tablegen backend takes an input .td file
18-
/// describing a list of options and emits a RST man page.
19-
static void EmitOptRST(const RecordKeeper &Records, raw_ostream &OS) {
17+
/// This tablegen backend takes an input .td file describing a list of options
18+
/// and emits a RST man page.
19+
static void EmitOptionRST(const RecordKeeper &Records, raw_ostream &OS) {
2020
llvm::StringMap<std::vector<const Record *>> OptionsByGroup;
2121
std::vector<Record *> OptionsWithoutGroup;
2222

@@ -97,5 +97,5 @@ static void EmitOptRST(const RecordKeeper &Records, raw_ostream &OS) {
9797
}
9898
}
9999

100-
static TableGen::Emitter::Opt X("gen-opt-rst", EmitOptRST,
100+
static TableGen::Emitter::Opt X("gen-opt-rst", EmitOptionRST,
101101
"Generate option RST");

llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ executable("llvm-tblgen") {
5656
"InstrDocsEmitter.cpp",
5757
"InstrInfoEmitter.cpp",
5858
"MacroFusionPredicatorEmitter.cpp",
59-
"OptParserEmitter.cpp",
60-
"OptRSTEmitter.cpp",
59+
"OptionParserEmitter.cpp",
60+
"OptionRSTEmitter.cpp",
6161
"PseudoLoweringEmitter.cpp",
6262
"RegisterBankEmitter.cpp",
6363
"RegisterInfoEmitter.cpp",

0 commit comments

Comments
 (0)