mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Make tablegen take an input filename to parse if one is specified, otherwise
use stdin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7431 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -29,13 +29,16 @@ namespace {
|
||||
Class("class", cl::desc("Print Enum list for this class"),
|
||||
cl::value_desc("class name"));
|
||||
|
||||
cl::opt<std::string>
|
||||
OutputFilename("o", cl::desc("Output filename"), cl::value_desc("filename"),
|
||||
cl::init("-"));
|
||||
cl::opt<std::string>
|
||||
OutputFilename("o", cl::desc("Output filename"), cl::value_desc("filename"),
|
||||
cl::init("-"));
|
||||
|
||||
cl::opt<std::string>
|
||||
InputFilename(cl::Positional, cl::desc("<input file>"), cl::init("-"));
|
||||
}
|
||||
|
||||
|
||||
void ParseFile();
|
||||
void ParseFile(const std::string &Filename);
|
||||
|
||||
RecordKeeper Records;
|
||||
|
||||
@@ -379,7 +382,7 @@ static void ParseMachineCode() {
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
cl::ParseCommandLineOptions(argc, argv);
|
||||
ParseFile();
|
||||
ParseFile(InputFilename);
|
||||
|
||||
std::ostream *Out = &std::cout;
|
||||
if (OutputFilename != "-") {
|
||||
|
||||
Reference in New Issue
Block a user