mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Added an option to TableGen that allows users to specify a directory in which
to find include files. TableGen will load include files from this directory if it cannot find them in the current directory. This feature was needed for building code inside the object tree (a la autoconf style). TODO: Allow for multiple -I options to specify a list of directories to search. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8159 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -64,10 +64,14 @@ namespace {
|
||||
|
||||
cl::opt<std::string>
|
||||
InputFilename(cl::Positional, cl::desc("<input file>"), cl::init("-"));
|
||||
|
||||
cl::opt<std::string>
|
||||
IncludeDir("I", cl::desc("Directory of include files"),
|
||||
cl::value_desc("directory"), cl::init(""));
|
||||
}
|
||||
|
||||
|
||||
void ParseFile(const std::string &Filename);
|
||||
void ParseFile(const std::string &Filename, const std::string & IncludeDir);
|
||||
|
||||
RecordKeeper Records;
|
||||
|
||||
@ -398,7 +402,7 @@ static void ParseMachineCode() {
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
cl::ParseCommandLineOptions(argc, argv);
|
||||
ParseFile(InputFilename);
|
||||
ParseFile(InputFilename, IncludeDir);
|
||||
|
||||
std::ostream *Out = &std::cout;
|
||||
if (OutputFilename != "-") {
|
||||
|
Reference in New Issue
Block a user