clang  14.0.0git
Public Member Functions | Public Attributes | List of all members
clang::CompilerInvocationRefBase Class Reference

The base class of CompilerInvocation with reference semantics. More...

#include "clang/Frontend/CompilerInvocation.h"

Inheritance diagram for clang::CompilerInvocationRefBase:
Inheritance graph
[legend]
Collaboration diagram for clang::CompilerInvocationRefBase:
Collaboration graph
[legend]

Public Member Functions

 CompilerInvocationRefBase ()
 
 CompilerInvocationRefBase (const CompilerInvocationRefBase &X)
 
 CompilerInvocationRefBase (CompilerInvocationRefBase &&X)
 
CompilerInvocationRefBaseoperator= (CompilerInvocationRefBase X)
 
CompilerInvocationRefBaseoperator= (CompilerInvocationRefBase &&X)
 
 ~CompilerInvocationRefBase ()
 
LangOptionsgetLangOpts ()
 
const LangOptionsgetLangOpts () const
 
TargetOptionsgetTargetOpts ()
 
const TargetOptionsgetTargetOpts () const
 
DiagnosticOptionsgetDiagnosticOpts () const
 
HeaderSearchOptionsgetHeaderSearchOpts ()
 
const HeaderSearchOptionsgetHeaderSearchOpts () const
 
std::shared_ptr< HeaderSearchOptionsgetHeaderSearchOptsPtr () const
 
std::shared_ptr< PreprocessorOptionsgetPreprocessorOptsPtr ()
 
PreprocessorOptionsgetPreprocessorOpts ()
 
const PreprocessorOptionsgetPreprocessorOpts () const
 
AnalyzerOptionsRef getAnalyzerOpts () const
 

Public Attributes

std::shared_ptr< LangOptionsLangOpts
 Options controlling the language variant. More...
 
std::shared_ptr< TargetOptionsTargetOpts
 Options controlling the target. More...
 
IntrusiveRefCntPtr< DiagnosticOptionsDiagnosticOpts
 Options controlling the diagnostic engine. More...
 
std::shared_ptr< HeaderSearchOptionsHeaderSearchOpts
 Options controlling the #include directive. More...
 
std::shared_ptr< PreprocessorOptionsPreprocessorOpts
 Options controlling the preprocessor (aside from #include handling). More...
 
AnalyzerOptionsRef AnalyzerOpts
 Options controlling the static analyzer. More...
 

Detailed Description

The base class of CompilerInvocation with reference semantics.

This class stores option objects behind reference-counted pointers. This is useful for clients that want to keep some option object around even after CompilerInvocation gets destroyed, without making a copy.

This is a separate class so that we can implement the copy constructor and assignment here and leave them defaulted in the rest of CompilerInvocation.

Definition at line 77 of file CompilerInvocation.h.

Constructor & Destructor Documentation

◆ CompilerInvocationRefBase() [1/3]

CompilerInvocationRefBase::CompilerInvocationRefBase ( )

Definition at line 113 of file CompilerInvocation.cpp.

◆ CompilerInvocationRefBase() [2/3]

CompilerInvocationRefBase::CompilerInvocationRefBase ( const CompilerInvocationRefBase X)

Definition at line 120 of file CompilerInvocation.cpp.

◆ CompilerInvocationRefBase() [3/3]

CompilerInvocationRefBase::CompilerInvocationRefBase ( CompilerInvocationRefBase &&  X)
default

◆ ~CompilerInvocationRefBase()

CompilerInvocationRefBase::~CompilerInvocationRefBase ( )
default

Member Function Documentation

◆ getAnalyzerOpts()

AnalyzerOptionsRef clang::CompilerInvocationRefBase::getAnalyzerOpts ( ) const
inline

Definition at line 132 of file CompilerInvocation.h.

References AnalyzerOpts.

◆ getDiagnosticOpts()

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

◆ getHeaderSearchOpts() [1/2]

HeaderSearchOptions& clang::CompilerInvocationRefBase::getHeaderSearchOpts ( )
inline

◆ getHeaderSearchOpts() [2/2]

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

Definition at line 114 of file CompilerInvocation.h.

References HeaderSearchOpts.

◆ getHeaderSearchOptsPtr()

std::shared_ptr<HeaderSearchOptions> clang::CompilerInvocationRefBase::getHeaderSearchOptsPtr ( ) const
inline

Definition at line 118 of file CompilerInvocation.h.

References HeaderSearchOpts.

◆ getLangOpts() [1/2]

LangOptions* clang::CompilerInvocationRefBase::getLangOpts ( )
inline

◆ getLangOpts() [2/2]

const LangOptions* clang::CompilerInvocationRefBase::getLangOpts ( ) const
inline

Definition at line 105 of file CompilerInvocation.h.

References LangOpts.

◆ getPreprocessorOpts() [1/2]

PreprocessorOptions& clang::CompilerInvocationRefBase::getPreprocessorOpts ( )
inline

◆ getPreprocessorOpts() [2/2]

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

Definition at line 128 of file CompilerInvocation.h.

References PreprocessorOpts.

◆ getPreprocessorOptsPtr()

std::shared_ptr<PreprocessorOptions> clang::CompilerInvocationRefBase::getPreprocessorOptsPtr ( )
inline

Definition at line 122 of file CompilerInvocation.h.

References PreprocessorOpts.

◆ getTargetOpts() [1/2]

TargetOptions& clang::CompilerInvocationRefBase::getTargetOpts ( )
inline

Definition at line 107 of file CompilerInvocation.h.

References TargetOpts.

Referenced by FixupInvocation(), and HasARCRuntime().

◆ getTargetOpts() [2/2]

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

Definition at line 108 of file CompilerInvocation.h.

References TargetOpts.

◆ operator=() [1/2]

CompilerInvocationRefBase & CompilerInvocationRefBase::operator= ( CompilerInvocationRefBase &&  X)
default

◆ operator=() [2/2]

CompilerInvocationRefBase & CompilerInvocationRefBase::operator= ( CompilerInvocationRefBase  X)

Member Data Documentation

◆ AnalyzerOpts

AnalyzerOptionsRef clang::CompilerInvocationRefBase::AnalyzerOpts

Options controlling the static analyzer.

Definition at line 95 of file CompilerInvocation.h.

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

◆ DiagnosticOpts

IntrusiveRefCntPtr<DiagnosticOptions> clang::CompilerInvocationRefBase::DiagnosticOpts

Options controlling the diagnostic engine.

Definition at line 86 of file CompilerInvocation.h.

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

◆ HeaderSearchOpts

std::shared_ptr<HeaderSearchOptions> clang::CompilerInvocationRefBase::HeaderSearchOpts

Options controlling the #include directive.

Definition at line 89 of file CompilerInvocation.h.

Referenced by clang::CompilerInvocation::generateCC1CommandLine(), getHeaderSearchOpts(), getHeaderSearchOptsPtr(), and operator=().

◆ LangOpts

std::shared_ptr<LangOptions> clang::CompilerInvocationRefBase::LangOpts

Options controlling the language variant.

Definition at line 80 of file CompilerInvocation.h.

Referenced by clang::CompilerInvocation::generateCC1CommandLine(), getLangOpts(), clang::CompilerInvocation::getModuleHash(), and operator=().

◆ PreprocessorOpts

std::shared_ptr<PreprocessorOptions> clang::CompilerInvocationRefBase::PreprocessorOpts

Options controlling the preprocessor (aside from #include handling).

Definition at line 92 of file CompilerInvocation.h.

Referenced by clang::CompilerInvocation::generateCC1CommandLine(), getPreprocessorOpts(), getPreprocessorOptsPtr(), and operator=().

◆ TargetOpts

std::shared_ptr<TargetOptions> clang::CompilerInvocationRefBase::TargetOpts

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