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:
John Criswell
2003-08-27 13:41:57 +00:00
parent 065c0b95a3
commit 96b4beda5c
4 changed files with 84 additions and 10 deletions

View File

@ -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 != "-") {