|
@@ -11,6 +11,7 @@
|
|
#include "llvm/ADT/STLExtras.h"
|
|
#include "llvm/ADT/STLExtras.h"
|
|
#include "llvm/Option/OptTable.h"
|
|
#include "llvm/Option/OptTable.h"
|
|
#include "llvm/Option/Option.h"
|
|
#include "llvm/Option/Option.h"
|
|
|
|
+#include <cassert>
|
|
|
|
|
|
using namespace clang::driver;
|
|
using namespace clang::driver;
|
|
using namespace clang::driver::options;
|
|
using namespace clang::driver::options;
|
|
@@ -40,5 +41,13 @@ public:
|
|
}
|
|
}
|
|
|
|
|
|
std::unique_ptr<OptTable> clang::driver::createDriverOptTable() {
|
|
std::unique_ptr<OptTable> clang::driver::createDriverOptTable() {
|
|
- return llvm::make_unique<DriverOptTable>();
|
|
|
|
|
|
+ auto Result = llvm::make_unique<DriverOptTable>();
|
|
|
|
+ // Options.inc is included in DriverOptions.cpp, and calls OptTable's
|
|
|
|
+ // addValues function.
|
|
|
|
+ // Opt is a variable used in the code fragment in Options.inc.
|
|
|
|
+ OptTable &Opt = *Result;
|
|
|
|
+#define OPTTABLE_ARG_INIT
|
|
|
|
+#include "clang/Driver/Options.inc"
|
|
|
|
+#undef OPTTABLE_ARG_INIT
|
|
|
|
+ return std::move(Result);
|
|
}
|
|
}
|