clang  14.0.0git
Macros | Typedefs | Functions
CompilerInvocation.cpp File Reference
#include "clang/Frontend/CompilerInvocation.h"
#include "TestModuleFileExtension.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/CommentOptions.h"
#include "clang/Basic/DebugInfoOptions.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticDriver.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/FileSystemOptions.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/LangStandard.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/Sanitizers.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/TargetOptions.h"
#include "clang/Basic/Version.h"
#include "clang/Basic/Visibility.h"
#include "clang/Basic/XRayInstr.h"
#include "clang/Config/config.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/Options.h"
#include "clang/Frontend/CommandLineSourceLoc.h"
#include "clang/Frontend/DependencyOutputOptions.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Frontend/FrontendOptions.h"
#include "clang/Frontend/FrontendPluginRegistry.h"
#include "clang/Frontend/MigratorOptions.h"
#include "clang/Frontend/PreprocessorOutputOptions.h"
#include "clang/Frontend/TextDiagnosticBuffer.h"
#include "clang/Frontend/Utils.h"
#include "clang/Lex/HeaderSearchOptions.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "clang/Sema/CodeCompleteOptions.h"
#include "clang/Serialization/ASTBitCodes.h"
#include "clang/Serialization/ModuleFileExtension.h"
#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/CachedHashString.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/FloatingPointMode.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/Linker/Linker.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/OptSpecifier.h"
#include "llvm/Option/OptTable.h"
#include "llvm/Option/Option.h"
#include "llvm/ProfileData/InstrProfReader.h"
#include "llvm/Remarks/HotnessThresholdParser.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/HashBuilder.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Regex.h"
#include "llvm/Support/VersionTuple.h"
#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetOptions.h"
#include <algorithm>
#include <atomic>
#include <cassert>
#include <cstddef>
#include <cstring>
#include <memory>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
#include "clang/Driver/Options.inc"
#include "clang/StaticAnalyzer/Core/Analyses.def"
#include "clang/StaticAnalyzer/Core/AnalyzerOptions.def"
#include "clang/Basic/LangStandards.def"
#include "clang/Basic/LangOptions.def"
#include "clang/Basic/DiagnosticOptions.def"

Go to the source code of this file.

Macros

#define SIMPLE_ENUM_VALUE_TABLE
 
#define PARSE_OPTION_WITH_MARSHALLING( ARGS, DIAGS, ID, FLAGS, PARAM, SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, MERGER, TABLE_INDEX)
 
#define GENERATE_OPTION_WITH_MARSHALLING( ARGS, STRING_ALLOCATOR, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX)
 
#define ANALYZER_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN)
 
#define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN)
 
#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATFN)
 
#define ANALYSIS_PURGE(NAME, CMDFLAG, DESC)
 
#define ANALYSIS_INLINING_MODE(NAME, CMDFLAG, DESC)
 
#define ANALYZER_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN)   .Case(CMDFLAG, NAME##Model)
 
#define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN)   .Case(CMDFLAG, NAME##Model)
 
#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATFN)   .Case(CMDFLAG, PD_##NAME)
 
#define ANALYSIS_PURGE(NAME, CMDFLAG, DESC)   .Case(CMDFLAG, NAME)
 
#define ANALYSIS_INLINING_MODE(NAME, CMDFLAG, DESC)   .Case(CMDFLAG, NAME)
 
#define ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, DEFAULT_VAL)   initOption(AnOpts.Config, Diags, AnOpts.NAME, CMDFLAG, DEFAULT_VAL);
 
#define ANALYZER_OPTION_DEPENDS_ON_USER_MODE(TYPE, NAME, CMDFLAG, DESC, SHALLOW_VAL, DEEP_VAL)
 
#define CODEGEN_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define CODEGEN_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define DEPENDENCY_OUTPUT_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define DEPENDENCY_OUTPUT_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define FILE_SYSTEM_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define FILE_SYSTEM_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define MIGRATOR_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define MIGRATOR_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define DIAG_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define DIAG_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define FRONTEND_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define FRONTEND_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define HEADER_SEARCH_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define HEADER_SEARCH_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define LANG_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define LANGSTANDARD(id, name, lang, desc, features)
 
#define LANGSTANDARD_ALIAS(id, alias)   if (KindValue == LangStandard::lang_##id) ++NumAliases;
 
#define LANGSTANDARD_ALIAS_DEPR(id, alias)
 
#define LANGSTANDARD(id, name, lang, desc, features)
 
#define LANGSTANDARD_ALIAS(id, alias)   if (KindValue == LangStandard::lang_##id) Diag << alias;
 
#define LANGSTANDARD_ALIAS_DEPR(id, alias)
 
#define LANG_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define PREPROCESSOR_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define PREPROCESSOR_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define PREPROCESSOR_OUTPUT_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define PREPROCESSOR_OUTPUT_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define TARGET_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define TARGET_OPTION_WITH_MARSHALLING( PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX)
 
#define LANGOPT(Name, Bits, Default, Description)   HBuilder.add(LangOpts->Name);
 
#define ENUM_LANGOPT(Name, Type, Bits, Default, Description)   HBuilder.add(static_cast<unsigned>(LangOpts->get##Name()));
 
#define BENIGN_LANGOPT(Name, Bits, Default, Description)
 
#define BENIGN_ENUM_LANGOPT(Name, Type, Bits, Default, Description)
 
#define DIAGOPT(Name, Bits, Default)   HBuilder.add(diagOpts.Name);
 
#define ENUM_DIAGOPT(Name, Type, Bits, Default)   HBuilder.add(diagOpts.get##Name());
 

Typedefs

using ParseFn = llvm::function_ref< bool(CompilerInvocation &, ArrayRef< const char * >, DiagnosticsEngine &, const char *)>
 
using GenerateFn = llvm::function_ref< void(CompilerInvocation &, SmallVectorImpl< const char * > &, CompilerInvocation::StringAllocator)>
 

Functions

static llvm::Optional< boolnormalizeSimpleFlag (OptSpecifier Opt, unsigned TableIndex, const ArgList &Args, DiagnosticsEngine &Diags)
 
static Optional< boolnormalizeSimpleNegativeFlag (OptSpecifier Opt, unsigned, const ArgList &Args, DiagnosticsEngine &)
 
static void denormalizeSimpleFlag (SmallVectorImpl< const char * > &Args, const char *Spelling, CompilerInvocation::StringAllocator, Option::OptionClass, unsigned,...)
 The tblgen-erated code passes in a fifth parameter of an arbitrary type, but denormalizeSimpleFlags never looks at it. More...
 
template<typename T >
static constexpr bool is_uint64_t_convertible ()
 
template<typename T , std::enable_if_t<!is_uint64_t_convertible< T >(), bool > = false>
static auto makeFlagToValueNormalizer (T Value)
 
static auto makeBooleanOptionNormalizer (bool Value, bool OtherValue, OptSpecifier OtherOpt)
 
static auto makeBooleanOptionDenormalizer (bool Value)
 
static void denormalizeStringImpl (SmallVectorImpl< const char * > &Args, const char *Spelling, CompilerInvocation::StringAllocator SA, Option::OptionClass OptClass, unsigned, const Twine &Value)
 
template<typename T >
static void denormalizeString (SmallVectorImpl< const char * > &Args, const char *Spelling, CompilerInvocation::StringAllocator SA, Option::OptionClass OptClass, unsigned TableIndex, T Value)
 
static Optional< SimpleEnumValue > findValueTableByName (const SimpleEnumValueTable &Table, StringRef Name)
 
static Optional< SimpleEnumValue > findValueTableByValue (const SimpleEnumValueTable &Table, unsigned Value)
 
static llvm::Optional< unsignednormalizeSimpleEnum (OptSpecifier Opt, unsigned TableIndex, const ArgList &Args, DiagnosticsEngine &Diags)
 
static void denormalizeSimpleEnumImpl (SmallVectorImpl< const char * > &Args, const char *Spelling, CompilerInvocation::StringAllocator SA, Option::OptionClass OptClass, unsigned TableIndex, unsigned Value)
 
template<typename T >
static void denormalizeSimpleEnum (SmallVectorImpl< const char * > &Args, const char *Spelling, CompilerInvocation::StringAllocator SA, Option::OptionClass OptClass, unsigned TableIndex, T Value)
 
static Optional< std::stringnormalizeString (OptSpecifier Opt, int TableIndex, const ArgList &Args, DiagnosticsEngine &Diags)
 
template<typename IntTy >
static Optional< IntTy > normalizeStringIntegral (OptSpecifier Opt, int, const ArgList &Args, DiagnosticsEngine &Diags)
 
static Optional< std::vector< std::string > > normalizeStringVector (OptSpecifier Opt, int, const ArgList &Args, DiagnosticsEngine &)
 
static void denormalizeStringVector (SmallVectorImpl< const char * > &Args, const char *Spelling, CompilerInvocation::StringAllocator SA, Option::OptionClass OptClass, unsigned TableIndex, const std::vector< std::string > &Values)
 
static Optional< std::stringnormalizeTriple (OptSpecifier Opt, int TableIndex, const ArgList &Args, DiagnosticsEngine &Diags)
 
template<typename T , typename U >
static T mergeForwardValue (T KeyPath, U Value)
 
template<typename T , typename U >
static T mergeMaskValue (T KeyPath, U Value)
 
template<typename T >
static T extractForwardValue (T KeyPath)
 
template<typename T , typename U , U Value>
static T extractMaskValue (T KeyPath)
 
static const StringRef GetInputKindName (InputKind IK)
 Get language name for given input kind. More...
 
static bool FixupInvocation (CompilerInvocation &Invocation, DiagnosticsEngine &Diags, const ArgList &Args, InputKind IK)
 
static unsigned getOptimizationLevel (ArgList &Args, InputKind IK, DiagnosticsEngine &Diags)
 
static unsigned getOptimizationLevelSize (ArgList &Args)
 
static void GenerateArg (SmallVectorImpl< const char * > &Args, llvm::opt::OptSpecifier OptSpecifier, CompilerInvocation::StringAllocator SA)
 
static void GenerateArg (SmallVectorImpl< const char * > &Args, llvm::opt::OptSpecifier OptSpecifier, const Twine &Value, CompilerInvocation::StringAllocator SA)
 
static bool RoundTrip (ParseFn Parse, GenerateFn Generate, CompilerInvocation &RealInvocation, CompilerInvocation &DummyInvocation, ArrayRef< const char * > CommandLineArgs, DiagnosticsEngine &Diags, const char *Argv0)
 
static void addDiagnosticArgs (ArgList &Args, OptSpecifier Group, OptSpecifier GroupWithValue, std::vector< std::string > &Diagnostics)
 
static void parseAnalyzerConfigs (AnalyzerOptions &AnOpts, DiagnosticsEngine *Diags)
 
static void getAllNoBuiltinFuncValues (ArgList &Args, std::vector< std::string > &Funcs)
 
static void GenerateAnalyzerArgs (AnalyzerOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA)
 
static bool ParseAnalyzerArgs (AnalyzerOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags)
 
static StringRef getStringOption (AnalyzerOptions::ConfigTable &Config, StringRef OptionName, StringRef DefaultVal)
 
static void initOption (AnalyzerOptions::ConfigTable &Config, DiagnosticsEngine *Diags, StringRef &OptionField, StringRef Name, StringRef DefaultVal)
 
static void initOption (AnalyzerOptions::ConfigTable &Config, DiagnosticsEngine *Diags, bool &OptionField, StringRef Name, bool DefaultVal)
 
static void initOption (AnalyzerOptions::ConfigTable &Config, DiagnosticsEngine *Diags, unsigned &OptionField, StringRef Name, unsigned DefaultVal)
 
static void GenerateOptimizationRemark (SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA, OptSpecifier OptEQ, StringRef Name, const CodeGenOptions::OptRemark &Remark)
 Generate a remark argument. This is an inverse of ParseOptimizationRemark. More...
 
static CodeGenOptions::OptRemark ParseOptimizationRemark (DiagnosticsEngine &Diags, ArgList &Args, OptSpecifier OptEQ, StringRef Name)
 Parse a remark command line argument. More...
 
static bool parseDiagnosticLevelMask (StringRef FlagName, const std::vector< std::string > &Levels, DiagnosticsEngine &Diags, DiagnosticLevelMask &M)
 
static void parseSanitizerKinds (StringRef FlagName, const std::vector< std::string > &Sanitizers, DiagnosticsEngine &Diags, SanitizerSet &S)
 
static SmallVector< StringRef, 4 > serializeSanitizerKinds (SanitizerSet S)
 
static void parseXRayInstrumentationBundle (StringRef FlagName, StringRef Bundle, ArgList &Args, DiagnosticsEngine &D, XRayInstrSet &S)
 
static std::string serializeXRayInstrumentationBundle (const XRayInstrSet &S)
 
static void setPGOUseInstrumentor (CodeGenOptions &Opts, const Twine &ProfileName)
 
static void GenerateDependencyOutputArgs (const DependencyOutputOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA)
 
static bool ParseDependencyOutputArgs (DependencyOutputOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags, frontend::ActionKind Action, bool ShowLineMarkers)
 
static bool parseShowColorsArgs (const ArgList &Args, bool DefaultColor)
 
static bool checkVerifyPrefixes (const std::vector< std::string > &VerifyPrefixes, DiagnosticsEngine &Diags)
 
static void GenerateFileSystemArgs (const FileSystemOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA)
 
static bool ParseFileSystemArgs (FileSystemOptions &Opts, const ArgList &Args, DiagnosticsEngine &Diags)
 
static void GenerateMigratorArgs (const MigratorOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA)
 
static bool ParseMigratorArgs (MigratorOptions &Opts, const ArgList &Args, DiagnosticsEngine &Diags)
 
static bool parseTestModuleFileExtensionArg (StringRef Arg, std::string &BlockName, unsigned &MajorVersion, unsigned &MinorVersion, bool &Hashed, std::string &UserInfo)
 Parse the argument to the -ftest-module-file-extension command-line argument. More...
 
static const auto & getFrontendActionTable ()
 Return a table that associates command line option specifiers with the frontend action. More...
 
static Optional< frontend::ActionKindgetFrontendAction (OptSpecifier &Opt)
 Maps command line option to frontend action. More...
 
static Optional< OptSpecifier > getProgramActionOpt (frontend::ActionKind ProgramAction)
 Maps frontend action to command line option. More...
 
static void GenerateFrontendArgs (const FrontendOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA, bool IsHeader)
 
static bool ParseFrontendArgs (FrontendOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags, bool &IsHeaderFile)
 
static void GenerateHeaderSearchArgs (HeaderSearchOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA)
 
static bool ParseHeaderSearchArgs (HeaderSearchOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags, const std::string &WorkingDir)
 
static bool IsInputCompatibleWithStandard (InputKind IK, const LangStandard &S)
 Check if input file kind and language standard are compatible. More...
 
static bool isStrictlyPreprocessorAction (frontend::ActionKind Action)
 
static void GeneratePreprocessorArgs (PreprocessorOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA, const LangOptions &LangOpts, const FrontendOptions &FrontendOpts, const CodeGenOptions &CodeGenOpts)
 
static bool ParsePreprocessorArgs (PreprocessorOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags, frontend::ActionKind Action, const FrontendOptions &FrontendOpts)
 
static void GeneratePreprocessorOutputArgs (const PreprocessorOutputOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA, frontend::ActionKind Action)
 
static bool ParsePreprocessorOutputArgs (PreprocessorOutputOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags, frontend::ActionKind Action)
 
static void GenerateTargetArgs (const TargetOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA)
 
static bool ParseTargetArgs (TargetOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags)
 

Macro Definition Documentation

◆ ANALYSIS_CONSTRAINTS [1/2]

#define ANALYSIS_CONSTRAINTS (   NAME,
  CMDFLAG,
  DESC,
  CREATFN 
)
Value:
case NAME##Model: \
GenerateArg(Args, OPT_analyzer_constraints, CMDFLAG, SA); \
break;

◆ ANALYSIS_CONSTRAINTS [2/2]

#define ANALYSIS_CONSTRAINTS (   NAME,
  CMDFLAG,
  DESC,
  CREATFN 
)    .Case(CMDFLAG, NAME##Model)

◆ ANALYSIS_DIAGNOSTICS [1/2]

#define ANALYSIS_DIAGNOSTICS (   NAME,
  CMDFLAG,
  DESC,
  CREATFN 
)
Value:
case PD_##NAME: \
GenerateArg(Args, OPT_analyzer_output, CMDFLAG, SA); \
break;

◆ ANALYSIS_DIAGNOSTICS [2/2]

#define ANALYSIS_DIAGNOSTICS (   NAME,
  CMDFLAG,
  DESC,
  CREATFN 
)    .Case(CMDFLAG, PD_##NAME)

◆ ANALYSIS_INLINING_MODE [1/2]

#define ANALYSIS_INLINING_MODE (   NAME,
  CMDFLAG,
  DESC 
)
Value:
case NAME: \
GenerateArg(Args, OPT_analyzer_inlining_mode, CMDFLAG, SA); \
break;

◆ ANALYSIS_INLINING_MODE [2/2]

#define ANALYSIS_INLINING_MODE (   NAME,
  CMDFLAG,
  DESC 
)    .Case(CMDFLAG, NAME)

◆ ANALYSIS_PURGE [1/2]

#define ANALYSIS_PURGE (   NAME,
  CMDFLAG,
  DESC 
)
Value:
case NAME: \
GenerateArg(Args, OPT_analyzer_purge, CMDFLAG, SA); \
break;

◆ ANALYSIS_PURGE [2/2]

#define ANALYSIS_PURGE (   NAME,
  CMDFLAG,
  DESC 
)    .Case(CMDFLAG, NAME)

◆ ANALYSIS_STORE [1/2]

#define ANALYSIS_STORE (   NAME,
  CMDFLAG,
  DESC,
  CREATFN 
)
Value:
case NAME##Model: \
GenerateArg(Args, OPT_analyzer_store, CMDFLAG, SA); \
break;

◆ ANALYSIS_STORE [2/2]

#define ANALYSIS_STORE (   NAME,
  CMDFLAG,
  DESC,
  CREATFN 
)    .Case(CMDFLAG, NAME##Model)

◆ ANALYZER_OPTION

#define ANALYZER_OPTION (   TYPE,
  NAME,
  CMDFLAG,
  DESC,
  DEFAULT_VAL 
)    initOption(AnOpts.Config, Diags, AnOpts.NAME, CMDFLAG, DEFAULT_VAL);

◆ ANALYZER_OPTION_DEPENDS_ON_USER_MODE

#define ANALYZER_OPTION_DEPENDS_ON_USER_MODE (   TYPE,
  NAME,
  CMDFLAG,
  DESC,
  SHALLOW_VAL,
  DEEP_VAL 
)
Value:
switch (AnOpts.getUserMode()) { \
case UMK_Shallow: \
initOption(AnOpts.Config, Diags, AnOpts.NAME, CMDFLAG, SHALLOW_VAL); \
break; \
case UMK_Deep: \
initOption(AnOpts.Config, Diags, AnOpts.NAME, CMDFLAG, DEEP_VAL); \
break; \
} \

◆ ANALYZER_OPTION_WITH_MARSHALLING [1/2]

#define ANALYZER_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, SA, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX)

◆ ANALYZER_OPTION_WITH_MARSHALLING [2/2]

#define ANALYZER_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, Diags, ID, FLAGS, PARAM, SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, MERGER, TABLE_INDEX)

◆ BENIGN_ENUM_LANGOPT

#define BENIGN_ENUM_LANGOPT (   Name,
  Type,
  Bits,
  Default,
  Description 
)

◆ BENIGN_LANGOPT

#define BENIGN_LANGOPT (   Name,
  Bits,
  Default,
  Description 
)

◆ CODEGEN_OPTION_WITH_MARSHALLING [1/2]

#define CODEGEN_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, SA, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX)

◆ CODEGEN_OPTION_WITH_MARSHALLING [2/2]

#define CODEGEN_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, Diags, ID, FLAGS, PARAM, SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, MERGER, TABLE_INDEX)

◆ DEPENDENCY_OUTPUT_OPTION_WITH_MARSHALLING [1/2]

#define DEPENDENCY_OUTPUT_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, SA, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX)

◆ DEPENDENCY_OUTPUT_OPTION_WITH_MARSHALLING [2/2]

#define DEPENDENCY_OUTPUT_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, Diags, ID, FLAGS, PARAM, SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, MERGER, TABLE_INDEX)

◆ DIAG_OPTION_WITH_MARSHALLING [1/2]

#define DIAG_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, SA, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX)

◆ DIAG_OPTION_WITH_MARSHALLING [2/2]

#define DIAG_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, *Diags, ID, FLAGS, PARAM, SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, MERGER, TABLE_INDEX)

◆ DIAGOPT

#define DIAGOPT (   Name,
  Bits,
  Default 
)    HBuilder.add(diagOpts.Name);

◆ ENUM_DIAGOPT

#define ENUM_DIAGOPT (   Name,
  Type,
  Bits,
  Default 
)    HBuilder.add(diagOpts.get##Name());

◆ ENUM_LANGOPT

#define ENUM_LANGOPT (   Name,
  Type,
  Bits,
  Default,
  Description 
)    HBuilder.add(static_cast<unsigned>(LangOpts->get##Name()));

◆ FILE_SYSTEM_OPTION_WITH_MARSHALLING [1/2]

#define FILE_SYSTEM_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, SA, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX)

◆ FILE_SYSTEM_OPTION_WITH_MARSHALLING [2/2]

#define FILE_SYSTEM_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, Diags, ID, FLAGS, PARAM, SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, MERGER, TABLE_INDEX)

◆ FRONTEND_OPTION_WITH_MARSHALLING [1/2]

#define FRONTEND_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, SA, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX)

◆ FRONTEND_OPTION_WITH_MARSHALLING [2/2]

#define FRONTEND_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, Diags, ID, FLAGS, PARAM, SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, MERGER, TABLE_INDEX)

◆ GENERATE_OPTION_WITH_MARSHALLING

#define GENERATE_OPTION_WITH_MARSHALLING (   ARGS,
  STRING_ALLOCATOR,
  KIND,
  FLAGS,
  SPELLING,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  DENORMALIZER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
if ((FLAGS)&options::CC1Option) { \
[&](const auto &Extracted) { \
if (ALWAYS_EMIT || \
(Extracted != \
static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE) \
: (DEFAULT_VALUE)))) \
DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class, \
TABLE_INDEX, Extracted); \
}(EXTRACTOR(KEYPATH)); \
}

Definition at line 426 of file CompilerInvocation.cpp.

◆ HEADER_SEARCH_OPTION_WITH_MARSHALLING [1/2]

#define HEADER_SEARCH_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, SA, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX)

◆ HEADER_SEARCH_OPTION_WITH_MARSHALLING [2/2]

#define HEADER_SEARCH_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, Diags, ID, FLAGS, PARAM, SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, MERGER, TABLE_INDEX)

◆ LANG_OPTION_WITH_MARSHALLING [1/2]

#define LANG_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, SA, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX)

◆ LANG_OPTION_WITH_MARSHALLING [2/2]

#define LANG_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, Diags, ID, FLAGS, PARAM, SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, MERGER, TABLE_INDEX)

◆ LANGOPT

#define LANGOPT (   Name,
  Bits,
  Default,
  Description 
)    HBuilder.add(LangOpts->Name);

◆ LANGSTANDARD [1/2]

#define LANGSTANDARD (   id,
  name,
  lang,
  desc,
  features 
)

◆ LANGSTANDARD [2/2]

#define LANGSTANDARD (   id,
  name,
  lang,
  desc,
  features 
)

◆ LANGSTANDARD_ALIAS [1/2]

#define LANGSTANDARD_ALIAS (   id,
  alias 
)    if (KindValue == LangStandard::lang_##id) ++NumAliases;

◆ LANGSTANDARD_ALIAS [2/2]

#define LANGSTANDARD_ALIAS (   id,
  alias 
)    if (KindValue == LangStandard::lang_##id) Diag << alias;

◆ LANGSTANDARD_ALIAS_DEPR [1/2]

#define LANGSTANDARD_ALIAS_DEPR (   id,
  alias 
)

◆ LANGSTANDARD_ALIAS_DEPR [2/2]

#define LANGSTANDARD_ALIAS_DEPR (   id,
  alias 
)

◆ MIGRATOR_OPTION_WITH_MARSHALLING [1/2]

#define MIGRATOR_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, SA, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX)

◆ MIGRATOR_OPTION_WITH_MARSHALLING [2/2]

#define MIGRATOR_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, Diags, ID, FLAGS, PARAM, SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, MERGER, TABLE_INDEX)

◆ PARSE_OPTION_WITH_MARSHALLING

#define PARSE_OPTION_WITH_MARSHALLING (   ARGS,
  DIAGS,
  ID,
  FLAGS,
  PARAM,
  SHOULD_PARSE,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  MERGER,
  TABLE_INDEX 
)
Value:
if ((FLAGS)&options::CC1Option) { \
KEYPATH = MERGER(KEYPATH, DEFAULT_VALUE); \
if (IMPLIED_CHECK) \
KEYPATH = MERGER(KEYPATH, IMPLIED_VALUE); \
if (SHOULD_PARSE) \
if (auto MaybeValue = NORMALIZER(OPT_##ID, TABLE_INDEX, ARGS, DIAGS)) \
KEYPATH = \
MERGER(KEYPATH, static_cast<decltype(KEYPATH)>(*MaybeValue)); \
}

Definition at line 411 of file CompilerInvocation.cpp.

◆ PREPROCESSOR_OPTION_WITH_MARSHALLING [1/2]

#define PREPROCESSOR_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, SA, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX)

◆ PREPROCESSOR_OPTION_WITH_MARSHALLING [2/2]

#define PREPROCESSOR_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, Diags, ID, FLAGS, PARAM, SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, MERGER, TABLE_INDEX)

◆ PREPROCESSOR_OUTPUT_OPTION_WITH_MARSHALLING [1/2]

#define PREPROCESSOR_OUTPUT_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, SA, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX)

◆ PREPROCESSOR_OUTPUT_OPTION_WITH_MARSHALLING [2/2]

#define PREPROCESSOR_OUTPUT_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, Diags, ID, FLAGS, PARAM, SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, MERGER, TABLE_INDEX)

◆ SIMPLE_ENUM_VALUE_TABLE

#define SIMPLE_ENUM_VALUE_TABLE

Definition at line 152 of file CompilerInvocation.cpp.

◆ TARGET_OPTION_WITH_MARSHALLING [1/2]

#define TARGET_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, SA, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX)

◆ TARGET_OPTION_WITH_MARSHALLING [2/2]

#define TARGET_OPTION_WITH_MARSHALLING (   PREFIX_TYPE,
  NAME,
  ID,
  KIND,
  GROUP,
  ALIAS,
  ALIASARGS,
  FLAGS,
  PARAM,
  HELPTEXT,
  METAVAR,
  VALUES,
  SPELLING,
  SHOULD_PARSE,
  ALWAYS_EMIT,
  KEYPATH,
  DEFAULT_VALUE,
  IMPLIED_CHECK,
  IMPLIED_VALUE,
  NORMALIZER,
  DENORMALIZER,
  MERGER,
  EXTRACTOR,
  TABLE_INDEX 
)
Value:
Args, Diags, ID, FLAGS, PARAM, SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, \
IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, MERGER, TABLE_INDEX)

Typedef Documentation

◆ GenerateFn

using GenerateFn = llvm::function_ref<void( CompilerInvocation &, SmallVectorImpl<const char *> &, CompilerInvocation::StringAllocator)>

Definition at line 612 of file CompilerInvocation.cpp.

◆ ParseFn

using ParseFn = llvm::function_ref<bool(CompilerInvocation &, ArrayRef<const char *>, DiagnosticsEngine &, const char *)>

Definition at line 607 of file CompilerInvocation.cpp.

Function Documentation

◆ addDiagnosticArgs()

static void addDiagnosticArgs ( ArgList &  Args,
OptSpecifier  Group,
OptSpecifier  GroupWithValue,
std::vector< std::string > &  Diagnostics 
)
static

Definition at line 746 of file CompilerInvocation.cpp.

References string().

◆ checkVerifyPrefixes()

static bool checkVerifyPrefixes ( const std::vector< std::string > &  VerifyPrefixes,
DiagnosticsEngine Diags 
)
static

◆ denormalizeSimpleEnum()

template<typename T >
static void denormalizeSimpleEnum ( SmallVectorImpl< const char * > &  Args,
const char *  Spelling,
CompilerInvocation::StringAllocator  SA,
Option::OptionClass  OptClass,
unsigned  TableIndex,
Value 
)
static

Definition at line 312 of file CompilerInvocation.cpp.

References denormalizeSimpleEnumImpl().

◆ denormalizeSimpleEnumImpl()

static void denormalizeSimpleEnumImpl ( SmallVectorImpl< const char * > &  Args,
const char *  Spelling,
CompilerInvocation::StringAllocator  SA,
Option::OptionClass  OptClass,
unsigned  TableIndex,
unsigned  Value 
)
static

Definition at line 295 of file CompilerInvocation.cpp.

References denormalizeString(), and findValueTableByValue().

Referenced by denormalizeSimpleEnum().

◆ denormalizeSimpleFlag()

static void denormalizeSimpleFlag ( SmallVectorImpl< const char * > &  Args,
const char *  Spelling,
CompilerInvocation::StringAllocator  ,
Option::OptionClass  ,
unsigned  ,
  ... 
)
static

The tblgen-erated code passes in a fifth parameter of an arbitrary type, but denormalizeSimpleFlags never looks at it.

Avoid bloating compile-time with unnecessary template instantiations and just ignore it with a variadic argument.

Definition at line 177 of file CompilerInvocation.cpp.

Referenced by GenerateArg().

◆ denormalizeString()

template<typename T >
static void denormalizeString ( SmallVectorImpl< const char * > &  Args,
const char *  Spelling,
CompilerInvocation::StringAllocator  SA,
Option::OptionClass  OptClass,
unsigned  TableIndex,
Value 
)
static

◆ denormalizeStringImpl()

static void denormalizeStringImpl ( SmallVectorImpl< const char * > &  Args,
const char *  Spelling,
CompilerInvocation::StringAllocator  SA,
Option::OptionClass  OptClass,
unsigned  ,
const Twine &  Value 
)
static

Definition at line 227 of file CompilerInvocation.cpp.

Referenced by denormalizeString().

◆ denormalizeStringVector()

static void denormalizeStringVector ( SmallVectorImpl< const char * > &  Args,
const char *  Spelling,
CompilerInvocation::StringAllocator  SA,
Option::OptionClass  OptClass,
unsigned  TableIndex,
const std::vector< std::string > &  Values 
)
static

Definition at line 352 of file CompilerInvocation.cpp.

References denormalizeString(), and string().

◆ extractForwardValue()

template<typename T >
static T extractForwardValue ( KeyPath)
static

Definition at line 402 of file CompilerInvocation.cpp.

◆ extractMaskValue()

template<typename T , typename U , U Value>
static T extractMaskValue ( KeyPath)
static

Definition at line 407 of file CompilerInvocation.cpp.

◆ findValueTableByName()

static Optional<SimpleEnumValue> findValueTableByName ( const SimpleEnumValueTable &  Table,
StringRef  Name 
)
static

Definition at line 258 of file CompilerInvocation.cpp.

Referenced by normalizeSimpleEnum().

◆ findValueTableByValue()

static Optional<SimpleEnumValue> findValueTableByValue ( const SimpleEnumValueTable &  Table,
unsigned  Value 
)
static

Definition at line 267 of file CompilerInvocation.cpp.

Referenced by denormalizeSimpleEnumImpl().

◆ FixupInvocation()

static bool FixupInvocation ( CompilerInvocation Invocation,
DiagnosticsEngine Diags,
const ArgList &  Args,
InputKind  IK 
)
static

◆ GenerateAnalyzerArgs()

static void GenerateAnalyzerArgs ( AnalyzerOptions Opts,
SmallVectorImpl< const char * > &  Args,
CompilerInvocation::StringAllocator  SA 
)
static

◆ GenerateArg() [1/2]

static void GenerateArg ( SmallVectorImpl< const char * > &  Args,
llvm::opt::OptSpecifier  OptSpecifier,
CompilerInvocation::StringAllocator  SA 
)
static

◆ GenerateArg() [2/2]

static void GenerateArg ( SmallVectorImpl< const char * > &  Args,
llvm::opt::OptSpecifier  OptSpecifier,
const Twine &  Value,
CompilerInvocation::StringAllocator  SA 
)
static

◆ GenerateDependencyOutputArgs()

static void GenerateDependencyOutputArgs ( const DependencyOutputOptions Opts,
SmallVectorImpl< const char * > &  Args,
CompilerInvocation::StringAllocator  SA 
)
static

◆ GenerateFileSystemArgs()

static void GenerateFileSystemArgs ( const FileSystemOptions Opts,
SmallVectorImpl< const char * > &  Args,
CompilerInvocation::StringAllocator  SA 
)
static

◆ GenerateFrontendArgs()

static void GenerateFrontendArgs ( const FrontendOptions Opts,
SmallVectorImpl< const char * > &  Args,
CompilerInvocation::StringAllocator  SA,
bool  IsHeader 
)
static

◆ GenerateHeaderSearchArgs()

static void GenerateHeaderSearchArgs ( HeaderSearchOptions Opts,
SmallVectorImpl< const char * > &  Args,
CompilerInvocation::StringAllocator  SA 
)
static

◆ GenerateMigratorArgs()

static void GenerateMigratorArgs ( const MigratorOptions Opts,
SmallVectorImpl< const char * > &  Args,
CompilerInvocation::StringAllocator  SA 
)
static

◆ GenerateOptimizationRemark()

static void GenerateOptimizationRemark ( SmallVectorImpl< const char * > &  Args,
CompilerInvocation::StringAllocator  SA,
OptSpecifier  OptEQ,
StringRef  Name,
const CodeGenOptions::OptRemark Remark 
)
static

Generate a remark argument. This is an inverse of ParseOptimizationRemark.

Definition at line 1157 of file CompilerInvocation.cpp.

◆ GeneratePreprocessorArgs()

static void GeneratePreprocessorArgs ( PreprocessorOptions Opts,
SmallVectorImpl< const char * > &  Args,
CompilerInvocation::StringAllocator  SA,
const LangOptions LangOpts,
const FrontendOptions FrontendOpts,
const CodeGenOptions CodeGenOpts 
)
static

◆ GeneratePreprocessorOutputArgs()

static void GeneratePreprocessorOutputArgs ( const PreprocessorOutputOptions Opts,
SmallVectorImpl< const char * > &  Args,
CompilerInvocation::StringAllocator  SA,
frontend::ActionKind  Action 
)
static

◆ GenerateTargetArgs()

static void GenerateTargetArgs ( const TargetOptions Opts,
SmallVectorImpl< const char * > &  Args,
CompilerInvocation::StringAllocator  SA 
)
static

◆ getAllNoBuiltinFuncValues()

static void getAllNoBuiltinFuncValues ( ArgList &  Args,
std::vector< std::string > &  Funcs 
)
static

Definition at line 772 of file CompilerInvocation.cpp.

References clang::Builtin::Context::isBuiltinFunc(), and string().

◆ getFrontendAction()

static Optional<frontend::ActionKind> getFrontendAction ( OptSpecifier &  Opt)
static

Maps command line option to frontend action.

Definition at line 2442 of file CompilerInvocation.cpp.

References getFrontendActionTable().

Referenced by ParseFrontendArgs().

◆ getFrontendActionTable()

static const auto& getFrontendActionTable ( )
static

◆ GetInputKindName()

static const StringRef GetInputKindName ( InputKind  IK)
static

◆ getOptimizationLevel()

static unsigned getOptimizationLevel ( ArgList &  Args,
InputKind  IK,
DiagnosticsEngine Diags 
)
static

◆ getOptimizationLevelSize()

static unsigned getOptimizationLevelSize ( ArgList &  Args)
static

Definition at line 571 of file CompilerInvocation.cpp.

◆ getProgramActionOpt()

static Optional<OptSpecifier> getProgramActionOpt ( frontend::ActionKind  ProgramAction)
static

Maps frontend action to command line option.

Definition at line 2452 of file CompilerInvocation.cpp.

References getFrontendActionTable().

Referenced by GenerateFrontendArgs().

◆ getStringOption()

static StringRef getStringOption ( AnalyzerOptions::ConfigTable Config,
StringRef  OptionName,
StringRef  DefaultVal 
)
static

Definition at line 1038 of file CompilerInvocation.cpp.

References string().

◆ initOption() [1/3]

static void initOption ( AnalyzerOptions::ConfigTable Config,
DiagnosticsEngine Diags,
bool OptionField,
StringRef  Name,
bool  DefaultVal 
)
static

Definition at line 1053 of file CompilerInvocation.cpp.

◆ initOption() [2/3]

static void initOption ( AnalyzerOptions::ConfigTable Config,
DiagnosticsEngine Diags,
StringRef &  OptionField,
StringRef  Name,
StringRef  DefaultVal 
)
static

Definition at line 1043 of file CompilerInvocation.cpp.

◆ initOption() [3/3]

static void initOption ( AnalyzerOptions::ConfigTable Config,
DiagnosticsEngine Diags,
unsigned OptionField,
StringRef  Name,
unsigned  DefaultVal 
)
static

Definition at line 1072 of file CompilerInvocation.cpp.

◆ is_uint64_t_convertible()

template<typename T >
static constexpr bool is_uint64_t_convertible ( )
staticconstexpr

Definition at line 184 of file CompilerInvocation.cpp.

◆ IsInputCompatibleWithStandard()

static bool IsInputCompatibleWithStandard ( InputKind  IK,
const LangStandard S 
)
static

Check if input file kind and language standard are compatible.

Definition at line 3256 of file CompilerInvocation.cpp.

◆ isStrictlyPreprocessorAction()

static bool isStrictlyPreprocessorAction ( frontend::ActionKind  Action)
static

◆ makeBooleanOptionDenormalizer()

static auto makeBooleanOptionDenormalizer ( bool  Value)
static

Definition at line 218 of file CompilerInvocation.cpp.

◆ makeBooleanOptionNormalizer()

static auto makeBooleanOptionNormalizer ( bool  Value,
bool  OtherValue,
OptSpecifier  OtherOpt 
)
static

Definition at line 206 of file CompilerInvocation.cpp.

◆ makeFlagToValueNormalizer()

template<typename T , std::enable_if_t<!is_uint64_t_convertible< T >(), bool > = false>
static auto makeFlagToValueNormalizer ( Value)
static

Definition at line 191 of file CompilerInvocation.cpp.

◆ mergeForwardValue()

template<typename T , typename U >
static T mergeForwardValue ( KeyPath,
U  Value 
)
static

Definition at line 394 of file CompilerInvocation.cpp.

◆ mergeMaskValue()

template<typename T , typename U >
static T mergeMaskValue ( KeyPath,
U  Value 
)
static

Definition at line 398 of file CompilerInvocation.cpp.

◆ normalizeSimpleEnum()

static llvm::Optional<unsigned> normalizeSimpleEnum ( OptSpecifier  Opt,
unsigned  TableIndex,
const ArgList &  Args,
DiagnosticsEngine Diags 
)
static

◆ normalizeSimpleFlag()

static llvm::Optional<bool> normalizeSimpleFlag ( OptSpecifier  Opt,
unsigned  TableIndex,
const ArgList &  Args,
DiagnosticsEngine Diags 
)
static

Definition at line 156 of file CompilerInvocation.cpp.

◆ normalizeSimpleNegativeFlag()

static Optional<bool> normalizeSimpleNegativeFlag ( OptSpecifier  Opt,
unsigned  ,
const ArgList &  Args,
DiagnosticsEngine  
)
static

Definition at line 165 of file CompilerInvocation.cpp.

◆ normalizeString()

static Optional<std::string> normalizeString ( OptSpecifier  Opt,
int  TableIndex,
const ArgList &  Args,
DiagnosticsEngine Diags 
)
static

Definition at line 321 of file CompilerInvocation.cpp.

References string().

◆ normalizeStringIntegral()

template<typename IntTy >
static Optional<IntTy> normalizeStringIntegral ( OptSpecifier  Opt,
int  ,
const ArgList &  Args,
DiagnosticsEngine Diags 
)
static

Definition at line 331 of file CompilerInvocation.cpp.

References clang::DiagnosticsEngine::Report().

◆ normalizeStringVector()

static Optional<std::vector<std::string> > normalizeStringVector ( OptSpecifier  Opt,
int  ,
const ArgList &  Args,
DiagnosticsEngine  
)
static

Definition at line 347 of file CompilerInvocation.cpp.

◆ normalizeTriple()

static Optional<std::string> normalizeTriple ( OptSpecifier  Opt,
int  TableIndex,
const ArgList &  Args,
DiagnosticsEngine Diags 
)
static

Definition at line 384 of file CompilerInvocation.cpp.

References normalize().

◆ ParseAnalyzerArgs()

static bool ParseAnalyzerArgs ( AnalyzerOptions Opts,
ArgList &  Args,
DiagnosticsEngine Diags 
)
static

Definition at line 879 of file CompilerInvocation.cpp.

References clang::DiagnosticsEngine::getNumErrors().

◆ parseAnalyzerConfigs()

static void parseAnalyzerConfigs ( AnalyzerOptions AnOpts,
DiagnosticsEngine Diags 
)
static

◆ ParseDependencyOutputArgs()

static bool ParseDependencyOutputArgs ( DependencyOutputOptions Opts,
ArgList &  Args,
DiagnosticsEngine Diags,
frontend::ActionKind  Action,
bool  ShowLineMarkers 
)
static

◆ parseDiagnosticLevelMask()

static bool parseDiagnosticLevelMask ( StringRef  FlagName,
const std::vector< std::string > &  Levels,
DiagnosticsEngine Diags,
DiagnosticLevelMask M 
)
static

◆ ParseFileSystemArgs()

static bool ParseFileSystemArgs ( FileSystemOptions Opts,
const ArgList &  Args,
DiagnosticsEngine Diags 
)
static

Definition at line 2162 of file CompilerInvocation.cpp.

References clang::DiagnosticsEngine::getNumErrors().

◆ ParseFrontendArgs()

static bool ParseFrontendArgs ( FrontendOptions Opts,
ArgList &  Args,
DiagnosticsEngine Diags,
bool IsHeaderFile 
)
static

Definition at line 2617 of file CompilerInvocation.cpp.

References clang::FrontendOptions::ActionName, clang::ADOF_Default, clang::ADOF_JSON, clang::FrontendOptions::ARCMT_None, clang::FrontendOptions::ARCMTAction, clang::Asm, clang::frontend::ASTDump, clang::FrontendOptions::ASTDumpAll, clang::FrontendOptions::ASTDumpDecls, clang::FrontendOptions::ASTDumpFormat, clang::FrontendOptions::AuxTargetCPU, clang::FrontendOptions::AuxTargetFeatures, clang::C, clang::FrontendOptions::CodeCompletionAt, clang::CUDA, clang::CXX, clang::FrontendOptions::DashX, clang::ParsedSourceLocation::FileName, clang::frontend::FixIt, clang::FrontendOptions::FixItSuffix, clang::ParsedSourceLocation::FromString(), clang::frontend::GenerateInterfaceStubs, clang::frontend::GenerateModule, clang::InputKind::getFormat(), getFrontendAction(), clang::FrontendOptions::getInputKindForExtension(), clang::DiagnosticsEngine::getNumErrors(), clang::InputKind::getPreprocessed(), clang::HIP, clang::FrontendOptions::Inputs, IsHeaderFile(), clang::FrontendOptions::IsSystemModule, clang::InputKind::isUnknown(), clang::LLVM_IR, max(), clang::FrontendOptions::ModuleFileExtensions, clang::FrontendOptions::ModuleFiles, clang::InputKind::ModuleMap, clang::ObjC, clang::FrontendOptions::ObjCMT_None, clang::FrontendOptions::ObjCMTAction, clang::ObjCXX, clang::OpenCL, clang::OpenCLCXX, clang::frontend::ParseSyntaxOnly, parseTestModuleFileExtensionArg(), clang::frontend::PluginAction, clang::FrontendOptions::PluginArgs, clang::FrontendOptions::Plugins, clang::InputKind::Precompiled, clang::FrontendOptions::ProgramAction, clang::RenderScript, clang::DiagnosticsEngine::Report(), clang::InputKind::Source, string(), clang::Unknown, and clang::InputKind::withFormat().

◆ ParseHeaderSearchArgs()

static bool ParseHeaderSearchArgs ( HeaderSearchOptions Opts,
ArgList &  Args,
DiagnosticsEngine Diags,
const std::string WorkingDir 
)
static

◆ ParseMigratorArgs()

static bool ParseMigratorArgs ( MigratorOptions Opts,
const ArgList &  Args,
DiagnosticsEngine Diags 
)
static

Definition at line 2198 of file CompilerInvocation.cpp.

References clang::DiagnosticsEngine::getNumErrors().

◆ ParseOptimizationRemark()

static CodeGenOptions::OptRemark ParseOptimizationRemark ( DiagnosticsEngine Diags,
ArgList &  Args,
OptSpecifier  OptEQ,
StringRef  Name 
)
static

Parse a remark command line argument.

It may be missing, disabled/enabled by '-R[no-]group' or specified with a regular expression by '-Rgroup=regexp'. On top of that, it can be disabled/enabled globally by '-R[no-]everything'.

Definition at line 1174 of file CompilerInvocation.cpp.

◆ ParsePreprocessorArgs()

static bool ParsePreprocessorArgs ( PreprocessorOptions Opts,
ArgList &  Args,
DiagnosticsEngine Diags,
frontend::ActionKind  Action,
const FrontendOptions FrontendOpts 
)
static

◆ ParsePreprocessorOutputArgs()

static bool ParsePreprocessorOutputArgs ( PreprocessorOutputOptions Opts,
ArgList &  Args,
DiagnosticsEngine Diags,
frontend::ActionKind  Action 
)
static

◆ parseSanitizerKinds()

static void parseSanitizerKinds ( StringRef  FlagName,
const std::vector< std::string > &  Sanitizers,
DiagnosticsEngine Diags,
SanitizerSet S 
)
static

Definition at line 1247 of file CompilerInvocation.cpp.

◆ parseShowColorsArgs()

static bool parseShowColorsArgs ( const ArgList &  Args,
bool  DefaultColor 
)
static

Definition at line 2094 of file CompilerInvocation.cpp.

◆ ParseTargetArgs()

static bool ParseTargetArgs ( TargetOptions Opts,
ArgList &  Args,
DiagnosticsEngine Diags 
)
static

◆ parseTestModuleFileExtensionArg()

static bool parseTestModuleFileExtensionArg ( StringRef  Arg,
std::string BlockName,
unsigned MajorVersion,
unsigned MinorVersion,
bool Hashed,
std::string UserInfo 
)
static

Parse the argument to the -ftest-module-file-extension command-line argument.

Returns
true on error, false on success.

Definition at line 2364 of file CompilerInvocation.cpp.

References string().

Referenced by ParseFrontendArgs().

◆ parseXRayInstrumentationBundle()

static void parseXRayInstrumentationBundle ( StringRef  FlagName,
StringRef  Bundle,
ArgList &  Args,
DiagnosticsEngine D,
XRayInstrSet S 
)
static

Definition at line 1265 of file CompilerInvocation.cpp.

◆ RoundTrip()

static bool RoundTrip ( ParseFn  Parse,
GenerateFn  Generate,
CompilerInvocation RealInvocation,
CompilerInvocation DummyInvocation,
ArrayRef< const char * >  CommandLineArgs,
DiagnosticsEngine Diags,
const char *  Argv0 
)
static

◆ serializeSanitizerKinds()

static SmallVector<StringRef, 4> serializeSanitizerKinds ( SanitizerSet  S)
static

Definition at line 1259 of file CompilerInvocation.cpp.

◆ serializeXRayInstrumentationBundle()

static std::string serializeXRayInstrumentationBundle ( const XRayInstrSet S)
static

Definition at line 1284 of file CompilerInvocation.cpp.

◆ setPGOUseInstrumentor()

static void setPGOUseInstrumentor ( CodeGenOptions Opts,
const Twine &  ProfileName 
)
static
clang::UMK_Shallow
@ UMK_Shallow
Perform shallow but fast analyzes.
Definition: AnalyzerOptions.h:135
clang::driver::options::CC1Option
@ CC1Option
Definition: Options.h:31
clang::driver::options::ID
ID
Definition: Options.h:41
PARSE_OPTION_WITH_MARSHALLING
#define PARSE_OPTION_WITH_MARSHALLING( ARGS, DIAGS, ID, FLAGS, PARAM, SHOULD_PARSE, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, MERGER, TABLE_INDEX)
Definition: CompilerInvocation.cpp:411
clang::UMK_Deep
@ UMK_Deep
Perform deep analyzes.
Definition: AnalyzerOptions.h:138
GENERATE_OPTION_WITH_MARSHALLING
#define GENERATE_OPTION_WITH_MARSHALLING( ARGS, STRING_ALLOCATOR, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR, TABLE_INDEX)
Definition: CompilerInvocation.cpp:426