From 898229ab4b81ef14429ea79cdd1c4aa3b479ca5a Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 14 Jun 2013 17:17:23 +0000 Subject: [Driver] Refactor clang driver to use LLVM's Option library The big changes are: - Deleting Driver/(Arg|Opt)* - Rewriting includes to llvm/Option/ and re-sorting - 'using namespace llvm::opt' in clang::driver - Fixing the autoconf build by adding option everywhere As discussed in the review, this change includes using directives in header files. I'll make follow up changes to remove those in favor of name specifiers. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D975 llvm-svn: 183989 --- clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp') diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index b0d76da3342..0309d53f06e 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -15,8 +15,6 @@ #include "clang/FrontendTool/Utils.h" #include "clang/ARCMigrate/ARCMTActions.h" #include "clang/CodeGen/CodeGenAction.h" -#include "clang/Driver/OptTable.h" -#include "clang/Driver/Option.h" #include "clang/Driver/Options.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/CompilerInvocation.h" @@ -25,9 +23,12 @@ #include "clang/Frontend/FrontendPluginRegistry.h" #include "clang/Rewrite/Frontend/FrontendActions.h" #include "clang/StaticAnalyzer/Frontend/FrontendActions.h" +#include "llvm/Option/OptTable.h" +#include "llvm/Option/Option.h" #include "llvm/Support/DynamicLibrary.h" #include "llvm/Support/ErrorHandling.h" using namespace clang; +using namespace llvm::opt; static FrontendAction *CreateFrontendBaseAction(CompilerInstance &CI) { using namespace clang::frontend; @@ -177,11 +178,10 @@ static FrontendAction *CreateFrontendAction(CompilerInstance &CI) { bool clang::ExecuteCompilerInvocation(CompilerInstance *Clang) { // Honor -help. if (Clang->getFrontendOpts().ShowHelp) { - OwningPtr Opts(driver::createDriverOptTable()); + OwningPtr Opts(driver::createDriverOptTable()); Opts->PrintHelp(llvm::outs(), "clang -cc1", "LLVM 'Clang' Compiler: http://clang.llvm.org", - /*Include=*/driver::options::CC1Option, - /*Exclude=*/0); + /*Include=*/ driver::options::CC1Option, /*Exclude=*/ 0); return 0; } -- cgit v1.2.3