summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/TableGen/Main.cpp')
-rw-r--r--llvm/lib/TableGen/Main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/TableGen/Main.cpp b/llvm/lib/TableGen/Main.cpp
index 3a070162608..df4088ad2f8 100644
--- a/llvm/lib/TableGen/Main.cpp
+++ b/llvm/lib/TableGen/Main.cpp
@@ -46,6 +46,10 @@ static cl::list<std::string>
IncludeDirs("I", cl::desc("Directory of include files"),
cl::value_desc("directory"), cl::Prefix);
+static cl::list<std::string>
+MacroNames("D", cl::desc("Name of the macro to be defined"),
+ cl::value_desc("macro name"), cl::Prefix);
+
static int reportError(const char *ProgName, Twine Msg) {
errs() << ProgName << ": " << Msg;
errs().flush();
@@ -91,7 +95,7 @@ int llvm::TableGenMain(char *argv0, TableGenMainFn *MainFn) {
// it later.
SrcMgr.setIncludeDirs(IncludeDirs);
- TGParser Parser(SrcMgr, Records);
+ TGParser Parser(SrcMgr, MacroNames, Records);
if (Parser.ParseFile())
return 1;
OpenPOWER on IntegriCloud