From bdabc2f19ffb9e20600dad6e8a300842a7bda50e Mon Sep 17 00:00:00 2001 From: patrick Date: Fri, 6 Apr 2018 14:26:03 +0000 Subject: Import LLVM 6.0.1 release including clang, lld and lldb. "where is the kaboom?" deraadt@ --- .../lib/FrontendTool/ExecuteCompilerInvocation.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'gnu/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp') diff --git a/gnu/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/gnu/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 16663155880..4167e1fe20b 100644 --- a/gnu/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/gnu/llvm/tools/clang/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-59-g8ed1b