clang 22.0.0git
clang::LangOptions Class Reference

Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that is accepted. More...

#include "clang/Basic/LangOptions.h"

Inheritance diagram for clang::LangOptions:
[legend]

Public Member Functions

 LangOptions ()
bool isCompilingModule () const
 Are we compiling a module?
bool isCompilingModuleImplementation () const
 Are we compiling a module implementation?
bool trackLocalOwningModule () const
 Do we need to track the owning module for a local declaration?
bool isSignedOverflowDefined () const
bool isSubscriptPointerArithmetic () const
bool isCompatibleWithMSVC (MSVCMajorVersion MajorVersion) const
bool isOverflowPatternExcluded (OverflowPatternExclusionKind Kind) const
void resetNonModularOptions ()
 Reset all of the options that are not considered when building a module.
bool isNoBuiltinFunc (StringRef Name) const
 Is this a libc/libm function that is no longer recognized as a builtin because a -fno-builtin-* option has been specified?
bool allowsNonTrivialObjCLifetimeQualifiers () const
 True if any ObjC types may have non-trivial lifetime qualifiers.
bool assumeFunctionsAreConvergent () const
bool threadPrivateMemoryAtomicsAreUndefined () const
 Return true if atomicrmw operations targeting allocations in private memory are undefined.
VersionTuple getOpenCLVersionTuple () const
 Return the OpenCL C or C++ version as a VersionTuple.
unsigned getOpenCLCompatibleVersion () const
 Return the OpenCL version that kernel language is compatible with.
std::string getOpenCLVersionString () const
 Return the OpenCL C or C++ for OpenCL language name and version as a string.
bool requiresStrictPrototypes () const
 Returns true if functions without prototypes or functions with an identifier list (aka K&R C functions) are not allowed.
bool implicitFunctionsAllowed () const
 Returns true if implicit function declarations are allowed in the current language mode.
bool hasAtExit () const
 Returns true if the language supports calling the 'atexit' function.
bool isImplicitIntRequired () const
 Returns true if implicit int is part of the language requirements.
bool isImplicitIntAllowed () const
 Returns true if implicit int is supported at all.
bool hasSignReturnAddress () const
 Check if return address signing is enabled.
bool isSignReturnAddressWithAKey () const
 Check if return address signing uses AKey.
bool isSignReturnAddressScopeAll () const
 Check if leaf functions are also signed.
bool isSYCL () const
bool hasDefaultVisibilityExportMapping () const
bool isExplicitDefaultVisibilityExportMapping () const
bool isAllDefaultVisibilityExportMapping () const
bool hasGlobalAllocationFunctionVisibility () const
bool hasDefaultGlobalAllocationFunctionVisibility () const
bool hasProtectedGlobalAllocationFunctionVisibility () const
bool hasHiddenGlobalAllocationFunctionVisibility () const
bool allowArrayReturnTypes () const
void remapPathPrefix (SmallVectorImpl< char > &Path) const
 Remap path prefix according to -fmacro-prefix-path option.
RoundingMode getDefaultRoundingMode () const
FPExceptionModeKind getDefaultExceptionMode () const
bool isTargetDevice () const
 True when compiling for an offloading target device.

Static Public Member Functions

static void setLangDefaults (LangOptions &Opts, Language Lang, const llvm::Triple &T, std::vector< std::string > &Includes, LangStandard::Kind LangStd=LangStandard::lang_unspecified)
 Set language defaults for the given input language and language standard in the given LangOptions object.

Public Attributes

LangStandard::Kind LangStd
 The used language standard.
SanitizerSet Sanitize
 Set of enabled sanitizers.
bool SanitizeCoverage = false
 Is at least one coverage instrumentation type enabled.
std::vector< std::string > NoSanitizeFiles
 Paths to files specifying which objects (files, functions, variables) should not be instrumented.
std::vector< std::string > XRayAlwaysInstrumentFiles
 Paths to the XRay "always instrument" files specifying which objects (files, functions, variables) should be imbued with the XRay "always instrument" attribute.
std::vector< std::string > XRayNeverInstrumentFiles
 Paths to the XRay "never instrument" files specifying which objects (files, functions, variables) should be imbued with the XRay "never instrument" attribute.
std::vector< std::string > XRayAttrListFiles
 Paths to the XRay attribute list files, specifying which objects (files, functions, variables) should be imbued with the appropriate XRay attribute(s).
std::vector< std::string > ProfileListFiles
 Paths to special case list files specifying which entities (files, functions) should or should not be instrumented.
clang::ObjCRuntime ObjCRuntime
CoreFoundationABI CFRuntime = CoreFoundationABI::Unspecified
std::string ObjCConstantStringClass
std::string OverflowHandler
 The name of the handler function to be called when -ftrapv is specified.
std::string ModuleName
 The module currently being compiled as specified by -fmodule-name.
std::string CurrentModule
 The name of the current module, of which the main source file is a part.
std::vector< std::string > ModuleFeatures
 The names of any features to enable in module 'requires' decls in addition to the hard-coded list in Module.cpp and the target features.
CommentOptions CommentOpts
 Options for parsing comments.
std::vector< std::string > NoBuiltinFuncs
 A list of all -fno-builtin-* function names (e.g., memset).
std::map< std::string, std::string, std::greater< std::string > > MacroPrefixMap
 A prefix map for FILE, BASE_FILE and __builtin_FILE().
std::vector< llvm::Triple > OMPTargetTriples
 Triples of the OpenMP targets that the host code codegen should take into account in order to generate accurate offloading descriptors.
std::string OMPHostIRFile
 Name of the IR file that contains the result of the OpenMP target host code generation.
std::string CUID
 The user provided compilation unit ID, if non-empty.
std::optional< TargetCXXABI::KindCXXABI
 C++ ABI to compile with, if specified by the frontend through -fc++-abi=.
bool IsHeaderFile = false
 Indicates whether the front-end is explicitly told that the input is a header file (i.e.
GPUDefaultStreamKind GPUDefaultStream
 The default stream kind used for HIP kernel launching.
unsigned OverflowPatternExclusionMask = 0
 Which overflow patterns should be excluded from sanitizer instrumentation.
std::vector< std::string > OverflowPatternExclusionValues
std::string RandstructSeed
 The seed used by the randomize structure layout feature.
bool UseTargetPathSeparator = false
 Indicates whether to use target's platform-specific file separator when FILE macro is used and when concatenating filename with directory or to use build environment environment's platform-specific file separator.
bool CheckNew = false
llvm::dxbc::RootSignatureVersion HLSLRootSigVer
 The HLSL root signature version for dxil.
std::string HLSLRootSigOverride
 The HLSL root signature that will be used to overide the root signature used for the shader entry point.
bool NoWasmOpt = false
bool AtomicRemoteMemory = false
 Atomic code-generation options.
bool AtomicFineGrainedMemory = false
bool AtomicIgnoreDenormalMode = false

Additional Inherited Members

Public Types inherited from clang::LangOptionsBase
enum class  CompatibilityKind { NotCompatible , Compatible , Benign }
 For ASTs produced with different option value, signifies their level of compatibility. More...
enum  GCMode { NonGC , GCOnly , HybridGC }
enum  StackProtectorMode { SSPOff , SSPOn , SSPStrong , SSPReq }
enum class  TrivialAutoVarInitKind { Uninitialized , Zero , Pattern }
enum  SignedOverflowBehaviorTy { SOB_Undefined , SOB_Defined , SOB_Trapping }
enum  CompilingModuleKind { CMK_None , CMK_ModuleMap , CMK_HeaderUnit , CMK_ModuleInterface }
enum  PragmaMSPointersToMembersKind { PPTMK_BestCase , PPTMK_FullGeneralitySingleInheritance , PPTMK_FullGeneralityMultipleInheritance , PPTMK_FullGeneralityVirtualInheritance }
enum  DefaultCallingConvention {
  DCC_None , DCC_CDecl , DCC_FastCall , DCC_StdCall ,
  DCC_VectorCall , DCC_RegCall , DCC_RtdCall
}
enum  AddrSpaceMapMangling { ASMM_Target , ASMM_On , ASMM_Off }
enum  MSVCMajorVersion {
  MSVC2010 = 1600 , MSVC2012 = 1700 , MSVC2013 = 1800 , MSVC2015 = 1900 ,
  MSVC2017 = 1910 , MSVC2017_5 = 1912 , MSVC2017_7 = 1914 , MSVC2019 = 1920 ,
  MSVC2019_5 = 1925 , MSVC2019_8 = 1928 , MSVC2022_3 = 1933 , MSVC2022_9 = 1939
}
enum  SYCLMajorVersion { SYCL_None , SYCL_2017 , SYCL_2020 , SYCL_Default = SYCL_2020 }
enum  HLSLLangStd {
  HLSL_Unset = 0 , HLSL_2015 = 2015 , HLSL_2016 = 2016 , HLSL_2017 = 2017 ,
  HLSL_2018 = 2018 , HLSL_2021 = 2021 , HLSL_202x = 2028 , HLSL_202y = 2029
}
enum class  ClangABI
 Clang versions with different platform ABI conformance. More...
enum class  CoreFoundationABI {
  Unspecified , Standalone , ObjectiveC , Swift ,
  Swift5_0 , Swift4_2 , Swift4_1
}
enum  FPModeKind { FPM_Off , FPM_On , FPM_Fast , FPM_FastHonorPragmas }
enum  FPExceptionModeKind { FPE_Ignore , FPE_MayTrap , FPE_Strict , FPE_Default }
 Possible floating point exception behavior. More...
enum  FPEvalMethodKind : unsigned { FEM_Source = 0 , FEM_Double = 1 , FEM_Extended = 2 , FEM_UnsetOnCommandLine = 3 }
 Possible float expression evaluation method choices. More...
enum  ExcessPrecisionKind { FPP_Standard , FPP_Fast , FPP_None }
enum class  LaxVectorConversionKind { None , Integer , All }
enum class  AltivecSrcCompatKind { Mixed , GCC , XL , Default = Mixed }
enum class  SignReturnAddressScopeKind { None , NonLeaf , All }
enum class  SignReturnAddressKeyKind { AKey , BKey }
enum class  ThreadModelKind { POSIX , Single }
enum class  ExtendArgsKind { ExtendTo32 , ExtendTo64 }
enum class  GPUDefaultStreamKind { Legacy , PerThread }
enum  OverflowPatternExclusionKind {
  None = 1 << 0 , All = 1 << 1 , AddSignedOverflowTest = 1 << 2 , AddUnsignedOverflowTest = 1 << 3 ,
  NegUnsignedConst = 1 << 4 , PostDecrInWhile = 1 << 5
}
 Exclude certain code patterns from being instrumented by arithmetic overflow sanitizers. More...
enum class  DefaultVisiblityExportMapping { None , Explicit , All }
enum class  VisibilityForcedKinds { ForceHidden , ForceProtected , ForceDefault , Source }
enum class  VisibilityFromDLLStorageClassKinds { Keep , Default , Hidden , Protected }
enum class  StrictFlexArraysLevelKind { Default = 0 , OneZeroOrIncomplete = 1 , ZeroOrIncomplete = 2 , IncompleteOnly = 3 }
enum  ComplexRangeKind {
  CX_Full , CX_Improved , CX_Promoted , CX_Basic ,
  CX_None
}
 Controls the various implementations for complex multiplication and. More...
enum class  RegisterStaticDestructorsKind { All , ThreadLocal , None }
 Controls which variables have static destructors registered. More...
using Visibility = clang::Visibility
using RoundingMode = llvm::RoundingMode
using CFBranchLabelSchemeKind = clang::CFBranchLabelSchemeKind
using MSVtorDispMode = clang::MSVtorDispMode

Detailed Description

Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that is accepted.

Definition at line 434 of file LangOptions.h.

Constructor & Destructor Documentation

◆ LangOptions()

LangOptions::LangOptions ( )

Definition at line 18 of file LangOptions.cpp.

References LangStd.

Referenced by setLangDefaults().

Member Function Documentation

◆ allowArrayReturnTypes()

bool clang::LangOptions::allowArrayReturnTypes ( ) const
inline

Definition at line 739 of file LangOptions.h.

References clang::HLSL.

Referenced by GetFullTypeForDeclarator().

◆ allowsNonTrivialObjCLifetimeQualifiers()

bool clang::LangOptions::allowsNonTrivialObjCLifetimeQualifiers ( ) const
inline

True if any ObjC types may have non-trivial lifetime qualifiers.

Definition at line 640 of file LangOptions.h.

◆ assumeFunctionsAreConvergent()

bool clang::LangOptions::assumeFunctionsAreConvergent ( ) const
inline

Definition at line 644 of file LangOptions.h.

Referenced by getTrivialDefaultFunctionAttributes(), and UpdateAsmCallInst().

◆ getDefaultExceptionMode()

◆ getDefaultRoundingMode()

RoundingMode clang::LangOptions::getDefaultRoundingMode ( ) const
inline

◆ getOpenCLCompatibleVersion()

◆ getOpenCLVersionString()

std::string LangOptions::getOpenCLVersionString ( ) const

Return the OpenCL C or C++ for OpenCL language name and version as a string.

Definition at line 81 of file LangOptions.cpp.

References getOpenCLVersionTuple(), and clang::Result.

Referenced by clang::Sema::ActOnVariableDeclarator(), FixupInvocation(), and clang::SemaOpenCL::handleNoSVMAttr().

◆ getOpenCLVersionTuple()

VersionTuple LangOptions::getOpenCLVersionTuple ( ) const

Return the OpenCL C or C++ version as a VersionTuple.

Definition at line 58 of file LangOptions.cpp.

Referenced by getOpenCLVersionString(), and clang::TargetInfo::validateOpenCLTarget().

◆ hasAtExit()

bool clang::LangOptions::hasAtExit ( ) const
inline

Returns true if the language supports calling the 'atexit' function.

Definition at line 679 of file LangOptions.h.

◆ hasDefaultGlobalAllocationFunctionVisibility()

bool clang::LangOptions::hasDefaultGlobalAllocationFunctionVisibility ( ) const
inline

Definition at line 724 of file LangOptions.h.

References clang::LangOptionsBase::ForceDefault.

◆ hasDefaultVisibilityExportMapping()

bool clang::LangOptions::hasDefaultVisibilityExportMapping ( ) const
inline

◆ hasGlobalAllocationFunctionVisibility()

bool clang::LangOptions::hasGlobalAllocationFunctionVisibility ( ) const
inline

Definition at line 719 of file LangOptions.h.

References clang::LangOptionsBase::Source.

◆ hasHiddenGlobalAllocationFunctionVisibility()

bool clang::LangOptions::hasHiddenGlobalAllocationFunctionVisibility ( ) const
inline

Definition at line 734 of file LangOptions.h.

References clang::LangOptionsBase::ForceHidden.

◆ hasProtectedGlobalAllocationFunctionVisibility()

bool clang::LangOptions::hasProtectedGlobalAllocationFunctionVisibility ( ) const
inline

Definition at line 729 of file LangOptions.h.

References clang::LangOptionsBase::ForceProtected.

◆ hasSignReturnAddress()

bool clang::LangOptions::hasSignReturnAddress ( ) const
inline

◆ implicitFunctionsAllowed()

bool clang::LangOptions::implicitFunctionsAllowed ( ) const
inline

Returns true if implicit function declarations are allowed in the current language mode.

Definition at line 674 of file LangOptions.h.

References clang::OpenCL, and requiresStrictPrototypes().

◆ isAllDefaultVisibilityExportMapping()

bool clang::LangOptions::isAllDefaultVisibilityExportMapping ( ) const
inline

◆ isCompatibleWithMSVC()

◆ isCompilingModule()

bool clang::LangOptions::isCompilingModule ( ) const
inline

◆ isCompilingModuleImplementation()

bool clang::LangOptions::isCompilingModuleImplementation ( ) const
inline

Are we compiling a module implementation?

Definition at line 601 of file LangOptions.h.

References isCompilingModule(), and ModuleName.

◆ isExplicitDefaultVisibilityExportMapping()

bool clang::LangOptions::isExplicitDefaultVisibilityExportMapping ( ) const
inline

◆ isImplicitIntAllowed()

bool clang::LangOptions::isImplicitIntAllowed ( ) const
inline

Returns true if implicit int is supported at all.

Definition at line 685 of file LangOptions.h.

References clang::C23, and clang::CPlusPlus.

Referenced by ConvertDeclSpecToType().

◆ isImplicitIntRequired()

bool clang::LangOptions::isImplicitIntRequired ( ) const
inline

Returns true if implicit int is part of the language requirements.

Definition at line 682 of file LangOptions.h.

References clang::C99, and clang::CPlusPlus.

Referenced by ConvertDeclSpecToType().

◆ isNoBuiltinFunc()

bool LangOptions::isNoBuiltinFunc ( StringRef Name) const

Is this a libc/libm function that is no longer recognized as a builtin because a -fno-builtin-* option has been specified?

Definition at line 51 of file LangOptions.cpp.

References NoBuiltinFuncs.

Referenced by getTrivialDefaultFunctionAttributes().

◆ isOverflowPatternExcluded()

bool clang::LangOptions::isOverflowPatternExcluded ( OverflowPatternExclusionKind Kind) const
inline

◆ isSignedOverflowDefined()

bool clang::LangOptions::isSignedOverflowDefined ( ) const
inline

Definition at line 610 of file LangOptions.h.

References clang::LangOptionsBase::SOB_Defined.

Referenced by DiagnoseBadShiftValues().

◆ isSignReturnAddressScopeAll()

bool clang::LangOptions::isSignReturnAddressScopeAll ( ) const
inline

◆ isSignReturnAddressWithAKey()

bool clang::LangOptions::isSignReturnAddressWithAKey ( ) const
inline

Check if return address signing uses AKey.

Definition at line 693 of file LangOptions.h.

References clang::LangOptionsBase::AKey.

Referenced by clang::TargetInfo::BranchProtectionInfo::BranchProtectionInfo(), and clang::targets::AArch64TargetInfo::getTargetDefines().

◆ isSubscriptPointerArithmetic()

bool clang::LangOptions::isSubscriptPointerArithmetic ( ) const
inline

Definition at line 614 of file LangOptions.h.

References ObjCRuntime.

◆ isSYCL()

bool clang::LangOptions::isSYCL ( ) const
inline

◆ isTargetDevice()

bool clang::LangOptions::isTargetDevice ( ) const
inline

True when compiling for an offloading target device.

Definition at line 757 of file LangOptions.h.

Referenced by ConvertDeclSpecToType(), HandleNeonVectorTypeAttr(), clang::InitializePreprocessor(), and clang::CodeGen::CodeGenModule::shouldEmitRTTI().

◆ remapPathPrefix()

void LangOptions::remapPathPrefix ( SmallVectorImpl< char > & Path) const

Remap path prefix according to -fmacro-prefix-path option.

Definition at line 75 of file LangOptions.cpp.

References MacroPrefixMap.

Referenced by clang::PredefinedExpr::ComputeName().

◆ requiresStrictPrototypes()

bool clang::LangOptions::requiresStrictPrototypes ( ) const
inline

Returns true if functions without prototypes or functions with an identifier list (aka K&R C functions) are not allowed.

Definition at line 668 of file LangOptions.h.

References clang::C23, and clang::CPlusPlus.

Referenced by CreateNewFunctionDecl(), GetFullTypeForDeclarator(), and implicitFunctionsAllowed().

◆ resetNonModularOptions()

void LangOptions::resetNonModularOptions ( )

Reset all of the options that are not considered when building a module.

Definition at line 25 of file LangOptions.cpp.

References CurrentModule, IsHeaderFile, NoSanitizeFiles, XRayAlwaysInstrumentFiles, and XRayNeverInstrumentFiles.

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

◆ setLangDefaults()

void LangOptions::setLangDefaults ( LangOptions & Opts,
Language Lang,
const llvm::Triple & T,
std::vector< std::string > & Includes,
LangStandard::Kind LangStd = LangStandard::lang_unspecified )
static

Set language defaults for the given input language and language standard in the given LangOptions object.

Parameters
Opts- The LangOptions object to set up.
Lang- The input language.
T- The target triple.
Includes- If the language requires extra headers to be implicitly included, they will be appended to this list.
LangStd- The input language standard.

Definition at line 91 of file LangOptions.cpp.

References clang::Asm, clang::CUDA, clang::LangOptionsBase::FPM_Fast, clang::LangOptionsBase::FPM_FastHonorPragmas, clang::LangOptionsBase::FPM_On, clang::getDefaultLanguageStandard(), clang::LangStandard::getLangStandardForKind(), getOpenCLCompatibleVersion(), clang::LangStandard::hasDigraphs(), clang::LangStandard::hasHexFloats(), clang::LangStandard::hasLineComments(), clang::LangStandard::hasRawStringLiterals(), clang::HIP, clang::HLSL, clang::LangOptionsBase::HLSL_2015, clang::LangOptionsBase::HLSL_2016, clang::LangOptionsBase::HLSL_2017, clang::LangOptionsBase::HLSL_2018, clang::LangOptionsBase::HLSL_2021, clang::LangOptionsBase::HLSL_202x, clang::LangOptionsBase::HLSL_202y, clang::LangStandard::isC11(), clang::LangStandard::isC17(), clang::LangStandard::isC23(), clang::LangStandard::isC2y(), clang::LangStandard::isC99(), clang::LangStandard::isCPlusPlus(), clang::LangStandard::isCPlusPlus11(), clang::LangStandard::isCPlusPlus14(), clang::LangStandard::isCPlusPlus17(), clang::LangStandard::isCPlusPlus20(), clang::LangStandard::isCPlusPlus23(), clang::LangStandard::isCPlusPlus26(), clang::LangStandard::isGNUMode(), clang::LangStandard::isOpenCL(), clang::LangStandard::lang_unspecified, LangOptions(), LangStd, clang::ObjC, clang::ObjCXX, and clang::T.

◆ threadPrivateMemoryAtomicsAreUndefined()

bool clang::LangOptions::threadPrivateMemoryAtomicsAreUndefined ( ) const
inline

Return true if atomicrmw operations targeting allocations in private memory are undefined.

Definition at line 650 of file LangOptions.h.

References clang::CUDA, and clang::OpenCL.

◆ trackLocalOwningModule()

bool clang::LangOptions::trackLocalOwningModule ( ) const
inline

Do we need to track the owning module for a local declaration?

Definition at line 606 of file LangOptions.h.

References isCompilingModule().

Referenced by clang::Decl::hasLocalOwningModuleStorage().

Member Data Documentation

◆ AtomicFineGrainedMemory

bool clang::LangOptions::AtomicFineGrainedMemory = false

Definition at line 566 of file LangOptions.h.

◆ AtomicIgnoreDenormalMode

bool clang::LangOptions::AtomicIgnoreDenormalMode = false

Definition at line 567 of file LangOptions.h.

Referenced by clang::targets::AMDGPUTargetInfo::getTargetDefines().

◆ AtomicRemoteMemory

bool clang::LangOptions::AtomicRemoteMemory = false

Atomic code-generation options.

These flags are set directly from the command-line options.

Definition at line 565 of file LangOptions.h.

◆ CFRuntime

◆ CheckNew

bool clang::LangOptions::CheckNew = false

Definition at line 549 of file LangOptions.h.

◆ CommentOpts

CommentOptions clang::LangOptions::CommentOpts

Options for parsing comments.

Definition at line 498 of file LangOptions.h.

Referenced by checkLanguageOptions().

◆ CUID

std::string clang::LangOptions::CUID

The user provided compilation unit ID, if non-empty.

This is used to externalize static variables which is needed to support accessing static device variables in host code for single source offloading languages like CUDA/HIP.

Definition at line 518 of file LangOptions.h.

Referenced by clang::CodeGen::CodeGenModule::printPostfixForExternalizedDecl().

◆ CurrentModule

std::string clang::LangOptions::CurrentModule

The name of the current module, of which the main source file is a part.

If CompilingModule is set, we are compiling the interface of this module, otherwise we are compiling an implementation file of it. This starts as ModuleName in case -fmodule-name is provided and changes during compilation to reflect the current module.

Definition at line 489 of file LangOptions.h.

Referenced by clang::Sema::ActOnModuleDecl(), clang::Sema::ActOnModuleImport(), clang::FrontendAction::BeginSourceFile(), clang::DumpModuleInfoAction::ExecuteAction(), FixupInvocation(), clang::FrontendAction::getCurrentModule(), clang::Preprocessor::getModuleForLocation(), clang::Module::isForBuilding(), prepareToBuildModule(), and resetNonModularOptions().

◆ CXXABI

std::optional<TargetCXXABI::Kind> clang::LangOptions::CXXABI

C++ ABI to compile with, if specified by the frontend through -fc++-abi=.

This overrides the default ABI used by the target.

Definition at line 522 of file LangOptions.h.

Referenced by clang::ASTContext::getCXXABIKind().

◆ GPUDefaultStream

GPUDefaultStreamKind clang::LangOptions::GPUDefaultStream

The default stream kind used for HIP kernel launching.

Definition at line 529 of file LangOptions.h.

Referenced by InitializeStandardPredefinedMacros().

◆ HLSLRootSigOverride

std::string clang::LangOptions::HLSLRootSigOverride

The HLSL root signature that will be used to overide the root signature used for the shader entry point.

Definition at line 557 of file LangOptions.h.

Referenced by clang::HLSLFrontendAction::ExecuteAction().

◆ HLSLRootSigVer

llvm::dxbc::RootSignatureVersion clang::LangOptions::HLSLRootSigVer
Initial value:
=
llvm::dxbc::RootSignatureVersion::V1_1

The HLSL root signature version for dxil.

Definition at line 552 of file LangOptions.h.

Referenced by clang::HLSLFrontendAction::ExecuteAction().

◆ IsHeaderFile

bool clang::LangOptions::IsHeaderFile = false

Indicates whether the front-end is explicitly told that the input is a header file (i.e.

-x c-header).

Definition at line 526 of file LangOptions.h.

Referenced by isMainFileLoc(), and resetNonModularOptions().

◆ LangStd

LangStandard::Kind clang::LangOptions::LangStd

The used language standard.

Definition at line 437 of file LangOptions.h.

Referenced by LangOptions(), clang::modulemap::parseModuleMap(), and setLangDefaults().

◆ MacroPrefixMap

std::map<std::string, std::string, std::greater<std::string> > clang::LangOptions::MacroPrefixMap

A prefix map for FILE, BASE_FILE and __builtin_FILE().

Definition at line 504 of file LangOptions.h.

Referenced by remapPathPrefix().

◆ ModuleFeatures

std::vector<std::string> clang::LangOptions::ModuleFeatures

The names of any features to enable in module 'requires' decls in addition to the hard-coded list in Module.cpp and the target features.

This list is sorted.

Definition at line 495 of file LangOptions.h.

Referenced by checkLanguageOptions(), and hasFeature().

◆ ModuleName

std::string clang::LangOptions::ModuleName

◆ NoBuiltinFuncs

std::vector<std::string> clang::LangOptions::NoBuiltinFuncs

A list of all -fno-builtin-* function names (e.g., memset).

Definition at line 501 of file LangOptions.h.

Referenced by addNoBuiltinAttributes(), clang::Builtin::Context::initializeBuiltins(), and isNoBuiltinFunc().

◆ NoSanitizeFiles

std::vector<std::string> clang::LangOptions::NoSanitizeFiles

Paths to files specifying which objects (files, functions, variables) should not be instrumented.

Definition at line 446 of file LangOptions.h.

Referenced by addSanitizers(), isSafeToIgnoreCWD(), and resetNonModularOptions().

◆ NoWasmOpt

bool clang::LangOptions::NoWasmOpt = false

Definition at line 561 of file LangOptions.h.

◆ ObjCConstantStringClass

std::string clang::LangOptions::ObjCConstantStringClass

Definition at line 473 of file LangOptions.h.

◆ ObjCRuntime

◆ OMPHostIRFile

std::string clang::LangOptions::OMPHostIRFile

Name of the IR file that contains the result of the OpenMP target host code generation.

Definition at line 512 of file LangOptions.h.

◆ OMPTargetTriples

std::vector<llvm::Triple> clang::LangOptions::OMPTargetTriples

Triples of the OpenMP targets that the host code codegen should take into account in order to generate accurate offloading descriptors.

Definition at line 508 of file LangOptions.h.

Referenced by emitCommonOMPTargetDirective().

◆ OverflowHandler

std::string clang::LangOptions::OverflowHandler

The name of the handler function to be called when -ftrapv is specified.

If none is specified, abort (GCC-compatible behaviour).

Definition at line 479 of file LangOptions.h.

◆ OverflowPatternExclusionMask

unsigned clang::LangOptions::OverflowPatternExclusionMask = 0

Which overflow patterns should be excluded from sanitizer instrumentation.

Definition at line 532 of file LangOptions.h.

Referenced by isOverflowPatternExcluded().

◆ OverflowPatternExclusionValues

std::vector<std::string> clang::LangOptions::OverflowPatternExclusionValues

Definition at line 534 of file LangOptions.h.

◆ ProfileListFiles

std::vector<std::string> clang::LangOptions::ProfileListFiles

Paths to special case list files specifying which entities (files, functions) should or should not be instrumented.

Definition at line 467 of file LangOptions.h.

◆ RandstructSeed

std::string clang::LangOptions::RandstructSeed

The seed used by the randomize structure layout feature.

Definition at line 537 of file LangOptions.h.

◆ Sanitize

◆ SanitizeCoverage

bool clang::LangOptions::SanitizeCoverage = false

Is at least one coverage instrumentation type enabled.

Definition at line 442 of file LangOptions.h.

Referenced by FixupInvocation().

◆ UseTargetPathSeparator

bool clang::LangOptions::UseTargetPathSeparator = false

Indicates whether to use target's platform-specific file separator when FILE macro is used and when concatenating filename with directory or to use build environment environment's platform-specific file separator.

The plaform-specific path separator is the backslash() for Windows and forward slash (/) elsewhere.

Definition at line 545 of file LangOptions.h.

◆ XRayAlwaysInstrumentFiles

std::vector<std::string> clang::LangOptions::XRayAlwaysInstrumentFiles

Paths to the XRay "always instrument" files specifying which objects (files, functions, variables) should be imbued with the XRay "always instrument" attribute.

WARNING: This is a deprecated field and will go away in the future.

Definition at line 452 of file LangOptions.h.

Referenced by resetNonModularOptions().

◆ XRayAttrListFiles

std::vector<std::string> clang::LangOptions::XRayAttrListFiles

Paths to the XRay attribute list files, specifying which objects (files, functions, variables) should be imbued with the appropriate XRay attribute(s).

Definition at line 463 of file LangOptions.h.

◆ XRayNeverInstrumentFiles

std::vector<std::string> clang::LangOptions::XRayNeverInstrumentFiles

Paths to the XRay "never instrument" files specifying which objects (files, functions, variables) should be imbued with the XRay "never instrument" attribute.

WARNING: This is a deprecated field and will go away in the future.

Definition at line 458 of file LangOptions.h.

Referenced by resetNonModularOptions().


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