From 461a67fa15370a9ec88f8f8a240bf7c123bb2029 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 18 Dec 2017 20:11:37 +0000 Subject: Vendor import of clang trunk r321017: https://llvm.org/svn/llvm-project/cfe/trunk@321017 --- lib/FrontendTool/ExecuteCompilerInvocation.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'lib/FrontendTool/ExecuteCompilerInvocation.cpp') 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(); case RewriteTest: return llvm::make_unique(); -#ifdef CLANG_ENABLE_OBJC_REWRITER +#if CLANG_ENABLE_OBJC_REWRITER case RewriteObjC: return llvm::make_unique(); #else case RewriteObjC: Action = "RewriteObjC"; break; #endif -#ifdef CLANG_ENABLE_ARCMT +#if CLANG_ENABLE_ARCMT case MigrateSource: return llvm::make_unique(); #else case MigrateSource: Action = "MigrateSource"; break; #endif -#ifdef CLANG_ENABLE_STATIC_ANALYZER +#if CLANG_ENABLE_STATIC_ANALYZER case RunAnalysis: return llvm::make_unique(); #else case RunAnalysis: Action = "RunAnalysis"; break; @@ -113,8 +113,8 @@ CreateFrontendBaseAction(CompilerInstance &CI) { case RunPreprocessorOnly: return llvm::make_unique(); } -#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(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 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) { -- cgit v1.2.3