diff options
Diffstat (limited to 'lib/Driver/DriverOptions.cpp')
-rw-r--r-- | lib/Driver/DriverOptions.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Driver/DriverOptions.cpp b/lib/Driver/DriverOptions.cpp index ac63b96cf96d1..11e7e4c8fe2bd 100644 --- a/lib/Driver/DriverOptions.cpp +++ b/lib/Driver/DriverOptions.cpp @@ -11,6 +11,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Option/OptTable.h" #include "llvm/Option/Option.h" +#include <cassert> using namespace clang::driver; using namespace clang::driver::options; @@ -40,5 +41,13 @@ public: } 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); } |