diff options
Diffstat (limited to 'lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r-- | lib/FrontendTool/ExecuteCompilerInvocation.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 166631558806..4167e1fe20b8 100644 --- a/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -94,18 +94,18 @@ CreateFrontendBaseAction(CompilerInstance &CI) { case RewriteMacros: return llvm::make_unique<RewriteMacrosAction>(); case RewriteTest: return llvm::make_unique<RewriteTestAction>(); -#ifdef CLANG_ENABLE_OBJC_REWRITER +#if CLANG_ENABLE_OBJC_REWRITER case RewriteObjC: return llvm::make_unique<RewriteObjCAction>(); #else case RewriteObjC: Action = "RewriteObjC"; break; #endif -#ifdef CLANG_ENABLE_ARCMT +#if CLANG_ENABLE_ARCMT case MigrateSource: return llvm::make_unique<arcmt::MigrateSourceAction>(); #else case MigrateSource: Action = "MigrateSource"; break; #endif -#ifdef CLANG_ENABLE_STATIC_ANALYZER +#if CLANG_ENABLE_STATIC_ANALYZER case RunAnalysis: return llvm::make_unique<ento::AnalysisAction>(); #else case RunAnalysis: Action = "RunAnalysis"; break; @@ -113,8 +113,8 @@ CreateFrontendBaseAction(CompilerInstance &CI) { case RunPreprocessorOnly: return llvm::make_unique<PreprocessOnlyAction>(); } -#if !defined(CLANG_ENABLE_ARCMT) || !defined(CLANG_ENABLE_STATIC_ANALYZER) \ - || !defined(CLANG_ENABLE_OBJC_REWRITER) +#if !CLANG_ENABLE_ARCMT || !CLANG_ENABLE_STATIC_ANALYZER \ + || !CLANG_ENABLE_OBJC_REWRITER CI.getDiagnostics().Report(diag::err_fe_action_not_available) << Action; return 0; #else @@ -135,7 +135,7 @@ CreateFrontendAction(CompilerInstance &CI) { Act = llvm::make_unique<FixItRecompile>(std::move(Act)); } -#ifdef CLANG_ENABLE_ARCMT +#if CLANG_ENABLE_ARCMT if (CI.getFrontendOpts().ProgramAction != frontend::MigrateSource && CI.getFrontendOpts().ProgramAction != frontend::GeneratePCH) { // Potentially wrap the base FE action in an ARC Migrate Tool action. @@ -179,7 +179,8 @@ bool clang::ExecuteCompilerInvocation(CompilerInstance *Clang) { std::unique_ptr<OptTable> 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, /*ShowAllAliases=*/false); return true; } @@ -227,7 +228,7 @@ bool clang::ExecuteCompilerInvocation(CompilerInstance *Clang) { llvm::cl::ParseCommandLineOptions(NumArgs + 1, Args.get()); } -#ifdef CLANG_ENABLE_STATIC_ANALYZER +#if CLANG_ENABLE_STATIC_ANALYZER // Honor -analyzer-checker-help. // This should happen AFTER plugins have been loaded! if (Clang->getAnalyzerOpts()->ShowCheckerHelp) { |