clang: clang::CompilerInvocationBase Class Reference (original) (raw)

The base class of CompilerInvocation. More...

#include "[clang/Frontend/CompilerInvocation.h](CompilerInvocation%5F8h%5Fsource.html)"

Classes
struct EmptyConstructor
Dummy tag type whose instance can be passed into the constructor to prevent creation of the reference-counted option objects. More...
Public Member Functions
const LangOptions & getLangOpts () const
Const getters.
const TargetOptions & getTargetOpts () const
const DiagnosticOptions & getDiagnosticOpts () const
const HeaderSearchOptions & getHeaderSearchOpts () const
const PreprocessorOptions & getPreprocessorOpts () const
const AnalyzerOptions & getAnalyzerOpts () const
const MigratorOptions & getMigratorOpts () const
const APINotesOptions & getAPINotesOpts () const
const CodeGenOptions & getCodeGenOpts () const
const FileSystemOptions & getFileSystemOpts () const
const FrontendOptions & getFrontendOpts () const
const DependencyOutputOptions & getDependencyOutputOpts () const
const PreprocessorOutputOptions & getPreprocessorOutputOpts () const
Protected Member Functions
CompilerInvocationBase ()
CompilerInvocationBase (EmptyConstructor)
CompilerInvocationBase (const CompilerInvocationBase &X)=delete
CompilerInvocationBase (CompilerInvocationBase &&X)=default
CompilerInvocationBase & operator= (const CompilerInvocationBase &X)=delete
CompilerInvocationBase & deep_copy_assign (const CompilerInvocationBase &X)
CompilerInvocationBase & shallow_copy_assign (const CompilerInvocationBase &X)
CompilerInvocationBase & operator= (CompilerInvocationBase &&X)=default
~CompilerInvocationBase ()=default
Protected Attributes
std::shared_ptr< LangOptions > LangOpts
Options controlling the language variant.
std::shared_ptr< TargetOptions > TargetOpts
Options controlling the target.
IntrusiveRefCntPtr< DiagnosticOptions > DiagnosticOpts
Options controlling the diagnostic engine.
std::shared_ptr< HeaderSearchOptions > HSOpts
Options controlling the #include directive.
std::shared_ptr< PreprocessorOptions > PPOpts
Options controlling the preprocessor (aside from #include handling).
AnalyzerOptionsRef AnalyzerOpts
Options controlling the static analyzer.
std::shared_ptr< MigratorOptions > MigratorOpts
std::shared_ptr< APINotesOptions > APINotesOpts
Options controlling API notes.
std::shared_ptr< CodeGenOptions > CodeGenOpts
Options controlling IRgen and the backend.
std::shared_ptr< FileSystemOptions > FSOpts
Options controlling file system operations.
std::shared_ptr< FrontendOptions > FrontendOpts
Options controlling the frontend itself.
std::shared_ptr< DependencyOutputOptions > DependencyOutputOpts
Options controlling dependency output.
std::shared_ptr< PreprocessorOutputOptions > PreprocessorOutputOpts
Options controlling preprocessed output.
using StringAllocator = llvm::function_ref< const char *(const Twine &)>
Command line generation.
using ArgumentConsumer = llvm::function_ref< void(const Twine &)>
void generateCC1CommandLine (llvm::SmallVectorImpl< const char * > &Args, StringAllocator SA) const
Generate cc1-compatible command line arguments from this instance.
void generateCC1CommandLine (ArgumentConsumer Consumer) const
Generate cc1-compatible command line arguments from this instance.
std::vector< std::string > getCC1CommandLine () const
Generate cc1-compatible command line arguments from this instance, wrapping the result as a std::vectorstd::string.

The base class of CompilerInvocation.

It keeps individual option objects behind reference-counted pointers, which is useful for clients that want to keep select option objects alive (even after CompilerInvocation gets destroyed) without making a copy.

Definition at line 74 of file CompilerInvocation.h.

ArgumentConsumer

StringAllocator

CompilerInvocationBase::CompilerInvocationBase ( ) protected

CompilerInvocationBase() [2/4]

clang::CompilerInvocationBase::CompilerInvocationBase ( EmptyConstructor ) inlineprotected

CompilerInvocationBase() [3/4]

CompilerInvocationBase() [4/4]

~CompilerInvocationBase()

clang::CompilerInvocationBase::~CompilerInvocationBase ( ) protecteddefault

deep_copy_assign()

Definition at line 155 of file CompilerInvocation.cpp.

References AnalyzerOpts, APINotesOpts, CodeGenOpts, DependencyOutputOpts, DiagnosticOpts, FrontendOpts, FSOpts, HSOpts, LangOpts, MigratorOpts, PPOpts, PreprocessorOutputOpts, TargetOpts, and X.

Referenced by clang::CompilerInvocation::CompilerInvocation(), clang::CowCompilerInvocation::CowCompilerInvocation(), and clang::CompilerInvocation::operator=().

generateCC1CommandLine() [1/2]

void CompilerInvocationBase::generateCC1CommandLine ( ArgumentConsumer Consumer ) const

Generate cc1-compatible command line arguments from this instance.

Parameters

Consumer - Callback that gets invoked for every single generated command line argument.

Definition at line 5183 of file CompilerInvocation.cpp.

References GenerateAnalyzerArgs(), GenerateAPINotesArgs(), GenerateDependencyOutputArgs(), GenerateFileSystemArgs(), GenerateFrontendArgs(), GenerateHeaderSearchArgs(), GenerateMigratorArgs(), GeneratePointerAuthArgs(), GeneratePreprocessorArgs(), GeneratePreprocessorOutputArgs(), GenerateTargetArgs(), getAnalyzerOpts(), getAPINotesOpts(), getCodeGenOpts(), getDependencyOutputOpts(), getDiagnosticOpts(), getFileSystemOpts(), getFrontendOpts(), getHeaderSearchOpts(), getLangOpts(), getMigratorOpts(), getPreprocessorOpts(), getPreprocessorOutputOpts(), getTargetOpts(), and clang::T.

generateCC1CommandLine() [2/2]

getAnalyzerOpts()

const AnalyzerOptions & clang::CompilerInvocationBase::getAnalyzerOpts ( ) const inline

getAPINotesOpts()

const APINotesOptions & clang::CompilerInvocationBase::getAPINotesOpts ( ) const inline

getCC1CommandLine()

std::vector< std::string > CompilerInvocationBase::getCC1CommandLine ( ) const

getCodeGenOpts()

const CodeGenOptions & clang::CompilerInvocationBase::getCodeGenOpts ( ) const inline

getDependencyOutputOpts()

getDiagnosticOpts()

const DiagnosticOptions & clang::CompilerInvocationBase::getDiagnosticOpts ( ) const inline

getFileSystemOpts()

const FileSystemOptions & clang::CompilerInvocationBase::getFileSystemOpts ( ) const inline

getFrontendOpts()

const FrontendOptions & clang::CompilerInvocationBase::getFrontendOpts ( ) const inline

getHeaderSearchOpts()

const HeaderSearchOptions & clang::CompilerInvocationBase::getHeaderSearchOpts ( ) const inline

getLangOpts()

const LangOptions & clang::CompilerInvocationBase::getLangOpts ( ) const inline

getMigratorOpts()

const MigratorOptions & clang::CompilerInvocationBase::getMigratorOpts ( ) const inline

getPreprocessorOpts()

const PreprocessorOptions & clang::CompilerInvocationBase::getPreprocessorOpts ( ) const inline

getPreprocessorOutputOpts()

getTargetOpts()

const TargetOptions & clang::CompilerInvocationBase::getTargetOpts ( ) const inline

operator=() [1/2]

operator=() [2/2]

shallow_copy_assign()

Definition at line 175 of file CompilerInvocation.cpp.

References AnalyzerOpts, APINotesOpts, CodeGenOpts, DependencyOutputOpts, DiagnosticOpts, FrontendOpts, FSOpts, HSOpts, LangOpts, MigratorOpts, PPOpts, PreprocessorOutputOpts, TargetOpts, and X.

Referenced by clang::CowCompilerInvocation::CowCompilerInvocation(), and clang::CowCompilerInvocation::operator=().

AnalyzerOpts

APINotesOpts

std::shared_ptr<APINotesOptions> clang::CompilerInvocationBase::APINotesOpts protected

CodeGenOpts

std::shared_ptr<CodeGenOptions> clang::CompilerInvocationBase::CodeGenOpts protected

DependencyOutputOpts

DiagnosticOpts

FrontendOpts

std::shared_ptr<FrontendOptions> clang::CompilerInvocationBase::FrontendOpts protected

FSOpts

HSOpts

LangOpts

std::shared_ptr<LangOptions> clang::CompilerInvocationBase::LangOpts protected

MigratorOpts

std::shared_ptr<MigratorOptions> clang::CompilerInvocationBase::MigratorOpts protected

PPOpts

PreprocessorOutputOpts

TargetOpts

std::shared_ptr<TargetOptions> clang::CompilerInvocationBase::TargetOpts protected

The documentation for this class was generated from the following files: