clang  6.0.0svn
Namespaces | Macros | Functions
CompilerInvocation.cpp File Reference
#include "clang/Frontend/CompilerInvocation.h"
#include "TestModuleFileExtension.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/Version.h"
#include "clang/Config/config.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/Options.h"
#include "clang/Driver/Util.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Frontend/LangStandard.h"
#include "clang/Frontend/Utils.h"
#include "clang/Lex/HeaderSearchOptions.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "clang/Serialization/ASTReader.h"
#include "clang/Serialization/ModuleFileExtension.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Linker/Linker.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/OptTable.h"
#include "llvm/Option/Option.h"
#include "llvm/ProfileData/InstrProfReader.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Support/ScopedPrinter.h"
#include <atomic>
#include <memory>
#include <sys/stat.h>
#include <system_error>
#include "clang/StaticAnalyzer/Core/Analyses.def"
#include "clang/Frontend/LangStandards.def"
#include "clang/Basic/LangOptions.def"
Include dependency graph for CompilerInvocation.cpp:

Go to the source code of this file.

Namespaces

 clang
 Dataflow Directional Tag Classes.
 

Macros

#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 LANGSTANDARD(id, name, lang, desc, features)   .Case(name, LangStandard::lang_##id)
 
#define LANGSTANDARD_ALIAS(id, alias)   .Case(alias, LangStandard::lang_##id)
 
#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 LANGOPT(Name, Bits, Default, Description)   code = hash_combine(code, LangOpts->Name);
 
#define ENUM_LANGOPT(Name, Type, Bits, Default, Description)   code = hash_combine(code, static_cast<unsigned>(LangOpts->get##Name()));
 
#define BENIGN_LANGOPT(Name, Bits, Default, Description)
 
#define BENIGN_ENUM_LANGOPT(Name, Type, Bits, Default, Description)
 

Functions

static unsigned getOptimizationLevel (ArgList &Args, InputKind IK, DiagnosticsEngine &Diags)
 
static unsigned getOptimizationLevelSize (ArgList &Args)
 
static void addDiagnosticArgs (ArgList &Args, OptSpecifier Group, OptSpecifier GroupWithValue, std::vector< std::string > &Diagnostics)
 
static void getAllNoBuiltinFuncValues (ArgList &Args, std::vector< std::string > &Funcs)
 
static bool ParseAnalyzerArgs (AnalyzerOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags)
 
static bool ParseMigratorArgs (MigratorOptions &Opts, ArgList &Args)
 
static void ParseCommentArgs (CommentOptions &Opts, ArgList &Args)
 
static StringRef getCodeModel (ArgList &Args, DiagnosticsEngine &Diags)
 
static StringRef getRelocModel (ArgList &Args, DiagnosticsEngine &Diags)
 
static std::shared_ptr< llvm::Regex > GenerateOptimizationRemarkRegex (DiagnosticsEngine &Diags, ArgList &Args, Arg *RpassArg)
 Create a new Regex instance out of the string value in RpassArg. 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 void setPGOInstrumentor (CodeGenOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags)
 
static void setPGOUseInstrumentor (CodeGenOptions &Opts, const Twine &ProfileName)
 
static bool ParseCodeGenArgs (CodeGenOptions &Opts, ArgList &Args, InputKind IK, DiagnosticsEngine &Diags, const TargetOptions &TargetOpts)
 
static void ParseDependencyOutputArgs (DependencyOutputOptions &Opts, ArgList &Args)
 
static bool parseShowColorsArgs (const ArgList &Args, bool DefaultColor)
 
static bool checkVerifyPrefixes (const std::vector< std::string > &VerifyPrefixes, DiagnosticsEngine *Diags)
 
static void ParseFileSystemArgs (FileSystemOptions &Opts, ArgList &Args)
 
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 InputKind ParseFrontendArgs (FrontendOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags, bool &IsHeaderFile)
 
static void ParseHeaderSearchArgs (HeaderSearchOptions &Opts, ArgList &Args, const std::string &WorkingDir)
 
static Visibility parseVisibility (Arg *arg, ArgList &args, DiagnosticsEngine &diags)
 Attempt to parse a visibility value out of the given argument. More...
 
static bool IsInputCompatibleWithStandard (InputKind IK, const LangStandard &S)
 Check if input file kind and language standard are compatible. More...
 
static const StringRef GetInputKindName (InputKind IK)
 Get language name for given input kind. More...
 
static void ParseLangArgs (LangOptions &Opts, ArgList &Args, InputKind IK, const TargetOptions &TargetOpts, PreprocessorOptions &PPOpts, DiagnosticsEngine &Diags)
 
static bool isStrictlyPreprocessorAction (frontend::ActionKind Action)
 
static void ParsePreprocessorArgs (PreprocessorOptions &Opts, ArgList &Args, FileManager &FileMgr, DiagnosticsEngine &Diags, frontend::ActionKind Action)
 
static void ParsePreprocessorOutputArgs (PreprocessorOutputOptions &Opts, ArgList &Args, frontend::ActionKind Action)
 
static void ParseTargetArgs (TargetOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags)
 
template<typename IntTy >
static IntTy clang::getLastArgIntValueImpl (const ArgList &Args, OptSpecifier Id, IntTy Default, DiagnosticsEngine *Diags)
 
int clang::getLastArgIntValue (const ArgList &Args, OptSpecifier Id, int Default, DiagnosticsEngine *Diags)
 
uint64_t clang::getLastArgUInt64Value (const ArgList &Args, OptSpecifier Id, uint64_t Default, DiagnosticsEngine *Diags)
 
void clang::BuryPointer (const void *Ptr)
 
IntrusiveRefCntPtr< vfs::FileSystemclang::createVFSFromCompilerInvocation (const CompilerInvocation &CI, DiagnosticsEngine &Diags)
 
IntrusiveRefCntPtr< vfs::FileSystemclang::createVFSFromCompilerInvocation (const CompilerInvocation &CI, DiagnosticsEngine &Diags, IntrusiveRefCntPtr< vfs::FileSystem > BaseFS)
 

Macro Definition Documentation

◆ ANALYSIS_CONSTRAINTS

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

◆ ANALYSIS_DIAGNOSTICS

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

◆ ANALYSIS_INLINING_MODE

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

◆ ANALYSIS_PURGE

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

◆ ANALYSIS_STORE

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

◆ BENIGN_ENUM_LANGOPT

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

◆ BENIGN_LANGOPT

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

◆ ENUM_LANGOPT

#define ENUM_LANGOPT (   Name,
  Type,
  Bits,
  Default,
  Description 
)    code = hash_combine(code, static_cast<unsigned>(LangOpts->get##Name()));

◆ LANGOPT

#define LANGOPT (   Name,
  Bits,
  Default,
  Description 
)    code = hash_combine(code, LangOpts->Name);

◆ LANGSTANDARD [1/3]

#define LANGSTANDARD (   id,
  name,
  lang,
  desc,
  features 
)    .Case(name, LangStandard::lang_##id)

Referenced by ParseLangArgs().

◆ LANGSTANDARD [2/3]

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

◆ LANGSTANDARD [3/3]

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

◆ LANGSTANDARD_ALIAS [1/3]

#define LANGSTANDARD_ALIAS (   id,
  alias 
)    .Case(alias, LangStandard::lang_##id)

◆ LANGSTANDARD_ALIAS [2/3]

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

◆ LANGSTANDARD_ALIAS [3/3]

#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 
)

Function Documentation

◆ addDiagnosticArgs()

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

Definition at line 125 of file CompilerInvocation.cpp.

Referenced by checkVerifyPrefixes().

◆ checkVerifyPrefixes()

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

◆ GenerateOptimizationRemarkRegex()

static std::shared_ptr<llvm::Regex> GenerateOptimizationRemarkRegex ( DiagnosticsEngine Diags,
ArgList &  Args,
Arg *  RpassArg 
)
static

Create a new Regex instance out of the string value in RpassArg.

It returns a pointer to the newly generated Regex instance.

Definition at line 347 of file CompilerInvocation.cpp.

References clang::DiagnosticsEngine::Report().

◆ getAllNoBuiltinFuncValues()

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

Definition at line 144 of file CompilerInvocation.cpp.

References clang::Builtin::Context::isBuiltinFunc().

Referenced by ParseLangArgs().

◆ getCodeModel()

static StringRef getCodeModel ( ArgList &  Args,
DiagnosticsEngine Diags 
)
static

Definition at line 322 of file CompilerInvocation.cpp.

References clang::DiagnosticsEngine::Report().

◆ 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 109 of file CompilerInvocation.cpp.

Referenced by ParseLangArgs().

◆ getRelocModel()

static StringRef getRelocModel ( ArgList &  Args,
DiagnosticsEngine Diags 
)
static

Definition at line 333 of file CompilerInvocation.cpp.

References clang::DiagnosticsEngine::Report().

◆ IsInputCompatibleWithStandard()

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

Check if input file kind and language standard are compatible.

Definition at line 1863 of file CompilerInvocation.cpp.

Referenced by ParseLangArgs().

◆ isStrictlyPreprocessorAction()

static bool isStrictlyPreprocessorAction ( frontend::ActionKind  Action)
static

◆ ParseAnalyzerArgs()

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

Definition at line 158 of file CompilerInvocation.cpp.

Referenced by clang::CompilerInvocation::CreateFromArgs().

◆ ParseCodeGenArgs()

static bool ParseCodeGenArgs ( CodeGenOptions Opts,
ArgList &  Args,
InputKind  IK,
DiagnosticsEngine Diags,
const TargetOptions TargetOpts 
)
static

◆ ParseCommentArgs()

static void ParseCommentArgs ( CommentOptions Opts,
ArgList &  Args 
)
static

◆ ParseDependencyOutputArgs()

static void ParseDependencyOutputArgs ( DependencyOutputOptions Opts,
ArgList &  Args 
)
static

◆ parseDiagnosticLevelMask()

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

◆ ParseFileSystemArgs()

static void ParseFileSystemArgs ( FileSystemOptions Opts,
ArgList &  Args 
)
static

◆ ParseFrontendArgs()

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

Definition at line 1261 of file CompilerInvocation.cpp.

References clang::FrontendOptions::ActionName, clang::FrontendOptions::AddPluginActions, clang::FrontendOptions::ARCMT_Check, clang::FrontendOptions::ARCMT_Migrate, clang::FrontendOptions::ARCMT_Modify, clang::FrontendOptions::ARCMT_None, clang::FrontendOptions::ARCMTAction, clang::FrontendOptions::ARCMTMigrateEmitARCErrors, clang::FrontendOptions::ARCMTMigrateReportOut, clang::InputKind::Asm, clang::frontend::ASTDeclList, clang::frontend::ASTDump, clang::FrontendOptions::ASTDumpAll, clang::FrontendOptions::ASTDumpDecls, clang::FrontendOptions::ASTDumpFilter, clang::FrontendOptions::ASTDumpLookups, clang::FrontendOptions::ASTMergeFiles, clang::frontend::ASTPrint, clang::frontend::ASTView, clang::FrontendOptions::AuxTriple, clang::InputKind::C, clang::FrontendOptions::CodeCompleteOpts, clang::FrontendOptions::CodeCompletionAt, clang::InputKind::CUDA, clang::InputKind::CXX, clang::FrontendOptions::DisableFree, clang::frontend::DumpRawTokens, clang::frontend::DumpTokens, clang::frontend::EmitAssembly, clang::frontend::EmitBC, clang::frontend::EmitCodeGenOnly, clang::frontend::EmitHTML, clang::frontend::EmitLLVM, clang::frontend::EmitLLVMOnly, clang::frontend::EmitObj, clang::ParsedSourceLocation::FileName, clang::FrontendOptions::FindPchSource, clang::FrontendOptions::FixAndRecompile, clang::frontend::FixIt, clang::FrontendOptions::FixItSuffix, clang::FrontendOptions::FixOnlyWarnings, clang::FrontendOptions::FixToTemporaries, clang::FrontendOptions::FixWhatYouCan, clang::ParsedSourceLocation::FromString(), clang::FrontendOptions::GenerateGlobalModuleIndex, clang::frontend::GenerateModule, clang::frontend::GenerateModuleInterface, clang::frontend::GeneratePCH, clang::frontend::GeneratePTH, clang::InputKind::getFormat(), clang::FrontendOptions::getInputKindForExtension(), clang::InputKind::getPreprocessed(), clang::if(), clang::CodeCompleteOptions::IncludeBriefComments, clang::CodeCompleteOptions::IncludeCodePatterns, clang::CodeCompleteOptions::IncludeGlobals, clang::CodeCompleteOptions::IncludeMacros, clang::CodeCompleteOptions::IncludeNamespaceLevelDecls, clang::FrontendOptions::IncludeTimestamps, clang::frontend::InitOnly, clang::FrontendOptions::Inputs, IsHeaderFile(), clang::InputKind::isUnknown(), clang::InputKind::LLVM_IR, clang::FrontendOptions::LLVMArgs, clang::frontend::MigrateSource, clang::FrontendOptions::ModuleFileExtensions, clang::frontend::ModuleFileInfo, clang::FrontendOptions::ModuleFiles, clang::InputKind::ModuleMap, clang::FrontendOptions::ModuleMapFiles, clang::FrontendOptions::ModulesEmbedAllFiles, clang::FrontendOptions::ModulesEmbedFiles, clang::FrontendOptions::MTMigrateDir, normalize(), clang::InputKind::ObjC, clang::FrontendOptions::ObjCMT_Annotation, clang::FrontendOptions::ObjCMT_AtomicProperty, clang::FrontendOptions::ObjCMT_DesignatedInitializer, clang::FrontendOptions::ObjCMT_Instancetype, clang::FrontendOptions::ObjCMT_Literals, clang::FrontendOptions::ObjCMT_MigrateDecls, clang::FrontendOptions::ObjCMT_None, clang::FrontendOptions::ObjCMT_NsAtomicIOSOnlyProperty, clang::FrontendOptions::ObjCMT_NsMacros, clang::FrontendOptions::ObjCMT_Property, clang::FrontendOptions::ObjCMT_PropertyDotSyntax, clang::FrontendOptions::ObjCMT_ProtocolConformance, clang::FrontendOptions::ObjCMT_ReadonlyProperty, clang::FrontendOptions::ObjCMT_ReadwriteProperty, clang::FrontendOptions::ObjCMT_ReturnsInnerPointerProperty, clang::FrontendOptions::ObjCMT_Subscripting, clang::FrontendOptions::ObjCMTAction, clang::FrontendOptions::ObjCMTWhiteListPath, clang::InputKind::ObjCXX, clang::InputKind::OpenCL, clang::FrontendOptions::OutputFile, clang::FrontendOptions::OverrideRecordLayoutsFile, clang::frontend::ParseSyntaxOnly, parseTestModuleFileExtensionArg(), clang::frontend::PluginAction, clang::FrontendOptions::PluginArgs, clang::FrontendOptions::Plugins, clang::InputKind::Precompiled, clang::frontend::PrintDeclContext, clang::frontend::PrintPreamble, clang::frontend::PrintPreprocessedInput, clang::FrontendOptions::ProgramAction, clang::FrontendOptions::RelocatablePCH, clang::InputKind::RenderScript, clang::DiagnosticsEngine::Report(), clang::frontend::RewriteMacros, clang::frontend::RewriteObjC, clang::frontend::RewriteTest, clang::frontend::RunAnalysis, clang::frontend::RunPreprocessorOnly, clang::FrontendOptions::ShowHelp, clang::FrontendOptions::ShowStats, clang::FrontendOptions::ShowTimers, clang::FrontendOptions::ShowVersion, clang::InputKind::Source, clang::FrontendOptions::StatsFile, clang::InputKind::Unknown, clang::FrontendOptions::UseGlobalModuleIndex, clang::frontend::VerifyPCH, and clang::InputKind::withFormat().

Referenced by clang::CompilerInvocation::CreateFromArgs().

◆ ParseHeaderSearchArgs()

static void ParseHeaderSearchArgs ( HeaderSearchOptions Opts,
ArgList &  Args,
const std::string &  WorkingDir 
)
static

◆ ParseLangArgs()

static void ParseLangArgs ( LangOptions Opts,
ArgList &  Args,
InputKind  IK,
const TargetOptions TargetOpts,
PreprocessorOptions PPOpts,
DiagnosticsEngine Diags 
)
static

Definition at line 1926 of file CompilerInvocation.cpp.

References clang::ObjCRuntime::allowsARC(), clang::ObjCRuntime::allowsWeak(), clang::LangOptions::ASMM_Off, clang::LangOptions::ASMM_On, clang::LangOptions::ASMM_Target, clang::LangOptions::CurrentModule, clang::LangOptions::DCC_CDecl, clang::LangOptions::DCC_FastCall, clang::LangOptions::DCC_None, clang::LangOptions::DCC_RegCall, clang::LangOptions::DCC_StdCall, clang::LangOptions::DCC_VectorCall, clang::DefaultVisibility, Diag(), clang::LangOptions::FPC_Fast, clang::LangOptions::FPC_Off, clang::LangOptions::FPC_On, clang::ObjCRuntime::FragileMacOSX, clang::LangOptions::GCOnly, getAllNoBuiltinFuncValues(), clang::LangStandard::getDescription(), GetInputKindName(), clang::ObjCRuntime::getKind(), clang::LangStandard::getLangStandardForKind(), clang::getLastArgIntValue(), clang::VersionTuple::getMajor(), clang::VersionTuple::getMinor(), clang::LangStandard::getName(), getOptimizationLevel(), getOptimizationLevelSize(), clang::VersionTuple::getSubminor(), clang::LangOptions::HybridGC, clang::if(), IsInputCompatibleWithStandard(), clang::LangStandard::lang_unspecified, LANGSTANDARD, clang::LangOptions::ModuleFeatures, clang::LangOptions::NoBuiltinFuncs, clang::LangOptions::NonGC, clang::LangOptions::ObjCConstantStringClass, clang::LangOptions::ObjCRuntime, clang::LangOptions::OMPHostIRFile, clang::LangOptions::OMPTargetTriples, clang::LangOptions::OverflowHandler, parseSanitizerKinds(), parseVisibility(), clang::LangOptions::PPTMK_BestCase, clang::LangOptions::PPTMK_FullGeneralityMultipleInheritance, clang::LangOptions::PPTMK_FullGeneralitySingleInheritance, clang::LangOptions::PPTMK_FullGeneralityVirtualInheritance, clang::DiagnosticsEngine::Report(), clang::LangOptions::Sanitize, clang::LangOptions::SanitizerBlacklistFiles, clang::CompilerInvocation::setLangDefaults(), clang::LangOptions::SOB_Defined, clang::LangOptions::SOB_Trapping, clang::LangOptions::SSPOff, clang::LangOptions::SSPOn, clang::LangOptions::SSPReq, clang::LangOptions::SSPStrong, clang::T, clang::TargetOptions::Triple, clang::VersionTuple::tryParse(), clang::ObjCRuntime::tryParse(), clang::LangOptions::XRayAlwaysInstrumentFiles, and clang::LangOptions::XRayNeverInstrumentFiles.

Referenced by clang::CompilerInvocation::CreateFromArgs().

◆ ParseMigratorArgs()

static bool ParseMigratorArgs ( MigratorOptions Opts,
ArgList &  Args 
)
static

◆ ParsePreprocessorArgs()

static void ParsePreprocessorArgs ( PreprocessorOptions Opts,
ArgList &  Args,
FileManager FileMgr,
DiagnosticsEngine Diags,
frontend::ActionKind  Action 
)
static

◆ ParsePreprocessorOutputArgs()

static void ParsePreprocessorOutputArgs ( PreprocessorOutputOptions Opts,
ArgList &  Args,
frontend::ActionKind  Action 
)
static

◆ parseSanitizerKinds()

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

◆ parseShowColorsArgs()

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

Definition at line 1041 of file CompilerInvocation.cpp.

Referenced by checkVerifyPrefixes().

◆ ParseTargetArgs()

static void 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 1241 of file CompilerInvocation.cpp.

Referenced by ParseFrontendArgs().

◆ parseVisibility()

static Visibility parseVisibility ( Arg *  arg,
ArgList &  args,
DiagnosticsEngine diags 
)
static

Attempt to parse a visibility value out of the given argument.

Definition at line 1845 of file CompilerInvocation.cpp.

References clang::DefaultVisibility, clang::HiddenVisibility, clang::ProtectedVisibility, and clang::DiagnosticsEngine::Report().

Referenced by ParseLangArgs().

◆ setPGOInstrumentor()

static void setPGOInstrumentor ( CodeGenOptions Opts,
ArgList &  Args,
DiagnosticsEngine Diags 
)
static

Definition at line 396 of file CompilerInvocation.cpp.

◆ setPGOUseInstrumentor()

static void setPGOUseInstrumentor ( CodeGenOptions Opts,
const Twine &  ProfileName 
)
static

Definition at line 418 of file CompilerInvocation.cpp.

References clang::serialized_diags::create().