Skip to content

Commit b6183f5

Browse files
committed
[TableGen] simplify types of escapeDependencyFilename
1 parent a8d9a90 commit b6183f5

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

llvm/lib/TableGen/Main.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,21 @@ static cl::opt<std::string> DependFilename("d", cl::desc("Dependency filename"),
5050
static cl::opt<std::string>
5151
InputFilename(cl::Positional, cl::desc("<input file>"), cl::init("-"));
5252

53-
static cl::list<std::string>
54-
IncludeDirs("I", cl::desc("Directory of include files"),
55-
cl::value_desc("directory"), cl::Prefix);
53+
static cl::list<std::string> IncludeDirs("I",
54+
cl::desc("Directory of include files"),
55+
cl::value_desc("directory"),
56+
cl::Prefix);
5657

5758
static cl::list<std::string>
5859
MacroNames("D", cl::desc("Name of the macro to be defined"),
5960
cl::value_desc("macro name"), cl::Prefix);
6061

6162
static cl::opt<bool>
62-
WriteIfChanged("write-if-changed", cl::desc("Only write output if it changed"));
63+
WriteIfChanged("write-if-changed",
64+
cl::desc("Only write output if it changed"));
6365

64-
static cl::opt<bool>
65-
TimePhases("time-phases", cl::desc("Time phases of parser and backend"));
66+
static cl::opt<bool> TimePhases("time-phases",
67+
cl::desc("Time phases of parser and backend"));
6668

6769
namespace llvm {
6870
cl::opt<bool> EmitLongStrLiterals(
@@ -85,8 +87,7 @@ static int reportError(const char *ProgName, Twine Msg) {
8587

8688
/// Escape a filename in the dependency file so that it is correctly
8789
/// interpreted by `make`. This is consistent with Clang, GCC, and lld.
88-
static TGLexer::DependenciesSetTy::value_type escapeDependencyFilename(
89-
const TGLexer::DependenciesSetTy::value_type &Filename) {
90+
static std::string escapeDependencyFilename(StringRef Filename) {
9091
std::string Res;
9192
raw_string_ostream OS(Res);
9293

0 commit comments

Comments
 (0)