|
clang
3.8.0
|
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that is accepted. More...
#include <LangOptions.h>
Public Types | |
| enum | GCMode { NonGC, GCOnly, HybridGC } |
| enum | StackProtectorMode { SSPOff, SSPOn, SSPStrong, SSPReq } |
| enum | SignedOverflowBehaviorTy { SOB_Undefined, SOB_Defined, SOB_Trapping } |
| enum | PragmaMSPointersToMembersKind { PPTMK_BestCase, PPTMK_FullGeneralitySingleInheritance, PPTMK_FullGeneralityMultipleInheritance, PPTMK_FullGeneralityVirtualInheritance } |
| enum | AddrSpaceMapMangling { ASMM_Target, ASMM_On, ASMM_Off } |
| enum | MSVCMajorVersion { MSVC2010 = 16, MSVC2012 = 17, MSVC2013 = 18, MSVC2015 = 19 } |
| typedef clang::Visibility | Visibility |
Public Member Functions | |
| LangOptions () | |
| bool | isSignedOverflowDefined () const |
| bool | isSubscriptPointerArithmetic () const |
| bool | isCompatibleWithMSVC (MSVCMajorVersion MajorVersion) const |
| void | resetNonModularOptions () |
| Reset all of the options that are not considered when building a module. More... | |
| bool | isNoBuiltinFunc (const char *Name) const |
| Is this a libc/libm function that is no longer recognized as a builtin because a -fno-builtin-* option has been specified? More... | |
Public Attributes | |
| SanitizerSet | Sanitize |
| Set of enabled sanitizers. More... | |
| std::vector< std::string > | SanitizerBlacklistFiles |
| Paths to blacklist files specifying which objects (files, functions, variables) should not be instrumented. More... | |
| clang::ObjCRuntime | ObjCRuntime |
| std::string | ObjCConstantStringClass |
| std::string | OverflowHandler |
| The name of the handler function to be called when -ftrapv is specified. More... | |
| std::string | CurrentModule |
| The name of the current module. More... | |
| std::string | ImplementationOfModule |
| The name of the module that the translation unit is an implementation of. More... | |
| 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. More... | |
| CommentOptions | CommentOpts |
| Options for parsing comments. More... | |
| std::vector< std::string > | NoBuiltinFuncs |
| A list of all -fno-builtin-* function names (e.g., memset). More... | |
| 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. More... | |
| std::string | OMPHostIRFile |
| Name of the IR file that contains the result of the OpenMP target host code generation. More... | |
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that is accepted.
Definition at line 48 of file LangOptions.h.
Definition at line 50 of file LangOptions.h.
| Enumerator | |
|---|---|
| ASMM_Target | |
| ASMM_On | |
| ASMM_Off | |
Definition at line 68 of file LangOptions.h.
| Enumerator | |
|---|---|
| NonGC | |
| GCOnly | |
| HybridGC | |
Definition at line 52 of file LangOptions.h.
| Enumerator | |
|---|---|
| MSVC2010 | |
| MSVC2012 | |
| MSVC2013 | |
| MSVC2015 | |
Definition at line 70 of file LangOptions.h.
| Enumerator | |
|---|---|
| PPTMK_BestCase | |
| PPTMK_FullGeneralitySingleInheritance | |
| PPTMK_FullGeneralityMultipleInheritance | |
| PPTMK_FullGeneralityVirtualInheritance | |
Definition at line 61 of file LangOptions.h.
| Enumerator | |
|---|---|
| SOB_Undefined | |
| SOB_Defined | |
| SOB_Trapping | |
Definition at line 55 of file LangOptions.h.
| Enumerator | |
|---|---|
| SSPOff | |
| SSPOn | |
| SSPStrong | |
| SSPReq | |
Definition at line 53 of file LangOptions.h.
| LangOptions::LangOptions | ( | ) |
Definition at line 18 of file LangOptions.cpp.
|
inline |
Definition at line 141 of file LangOptions.h.
Referenced by AddKeyword(), clang::Sema::checkClassLevelDLLAttribute(), clang::TextDiagnostic::emitDiagnosticLoc(), and getMSManglingNumber().
| bool LangOptions::isNoBuiltinFunc | ( | const char * | 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 40 of file LangOptions.cpp.
References NoBuiltinFuncs.
|
inline |
Definition at line 132 of file LangOptions.h.
References SOB_Defined.
Referenced by emitPointerArithmetic().
|
inline |
Definition at line 136 of file LangOptions.h.
References clang::ObjCRuntime::isSubscriptPointerArithmetic().
| void LangOptions::resetNonModularOptions | ( | ) |
Reset all of the options that are not considered when building a module.
Definition at line 24 of file LangOptions.cpp.
References clang::SanitizerSet::clear(), CurrentModule, ImplementationOfModule, Sanitize, and SanitizerBlacklistFiles.
| CommentOptions clang::LangOptions::CommentOpts |
Options for parsing comments.
Definition at line 110 of file LangOptions.h.
Referenced by clang::Sema::ActOnComment(), checkLanguageOptions(), clang::CompilerInvocation::CreateFromArgs(), clang::ASTContext::getRawCommentForDeclNoCache(), and clang::ASTReader::ReadComments().
| std::string clang::LangOptions::CurrentModule |
The name of the current module.
Definition at line 96 of file LangOptions.h.
Referenced by clang::Sema::ActOnModuleImport(), clang::Sema::addMethodToGlobalList(), clang::GenerateModuleAction::BeginSourceFileAction(), clang::GenerateModuleAction::ComputeASTConsumerArguments(), EvaluateBuildingModule(), clang::ModuleMap::findOrCreateModule(), clang::ASTUnit::isModuleFile(), clang::CompilerInstance::loadModule(), ParseLangArgs(), and resetNonModularOptions().
| std::string clang::LangOptions::ImplementationOfModule |
The name of the module that the translation unit is an implementation of.
Prevents semantic imports, but does not otherwise treat this as the CurrentModule.
Definition at line 101 of file LangOptions.h.
Referenced by clang::Sema::ActOnModuleImport(), clang::CompilerInstance::loadModule(), ParseLangArgs(), and resetNonModularOptions().
| 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 107 of file LangOptions.h.
Referenced by checkLanguageOptions(), hasFeature(), and ParseLangArgs().
| std::vector<std::string> clang::LangOptions::NoBuiltinFuncs |
A list of all -fno-builtin-* function names (e.g., memset).
Definition at line 113 of file LangOptions.h.
Referenced by isNoBuiltinFunc(), and ParseLangArgs().
| std::string clang::LangOptions::ObjCConstantStringClass |
Definition at line 87 of file LangOptions.h.
Referenced by ParseLangArgs().
| clang::ObjCRuntime clang::LangOptions::ObjCRuntime |
Definition at line 85 of file LangOptions.h.
Referenced by clang::Sema::ActOnAtEnd(), clang::Sema::ActOnDefs(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::BuildExceptionDeclaration(), clang::Decl::canBeWeakImported(), checkArithmeticOnObjCPointer(), clang::Sema::CheckImplementationIvars(), checkLanguageOptions(), CheckObjCTraitOperandConstraints(), CheckProtocolMethodDefs(), createARCRuntimeFunction(), clang::CodeGen::CreateGNUObjCRuntime(), clang::Sema::DefaultSynthesizeProperties(), DiagnoseUnimplementedAccessor(), clang::CodeGen::CodeGenFunction::EmitObjCAutoreleasePoolStmt(), EncodeBitField(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), getObjCPersonality(), getObjCXXPersonality(), HasFeature(), hasUnwindExceptions(), clang::Sema::ImplMethodsVsClassMethods(), InitializePredefinedMacros(), ParseLangArgs(), and UseOptimizedSetter().
| std::string clang::LangOptions::OMPHostIRFile |
Name of the IR file that contains the result of the OpenMP target host code generation.
Definition at line 121 of file LangOptions.h.
Referenced by clang::loadOffloadInfoMetadata(), and ParseLangArgs().
| 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 117 of file LangOptions.h.
Referenced by clang::createOffloadingBinaryDescriptorRegistration(), clang::CodeGen::CodeGenFunction::EmitOMPTargetDirective(), and ParseLangArgs().
| 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 93 of file LangOptions.h.
Referenced by ParseLangArgs().
| SanitizerSet clang::LangOptions::Sanitize |
Set of enabled sanitizers.
Definition at line 79 of file LangOptions.h.
Referenced by clang::CodeGen::CodeGenModule::CodeGenModule(), clang::CompilerInvocation::CreateFromArgs(), clang::CodeGen::CodeGenModule::CreateFunctionBitSetEntry(), clang::CodeGen::SanitizerMetadata::disableSanitizerForGlobal(), clang::CodeGen::CodeGenFunction::EmitLifetimeStart(), clang::CodeGen::CodeGenModule::EmitVTableBitSetEntries(), clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromLiteral(), HasFeature(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::RecordDecl::mayInsertExtraPadding(), ParseLangArgs(), clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), and resetNonModularOptions().
| std::vector<std::string> clang::LangOptions::SanitizerBlacklistFiles |
Paths to blacklist files specifying which objects (files, functions, variables) should not be instrumented.
Definition at line 83 of file LangOptions.h.
Referenced by addDataFlowSanitizerPass(), ParseLangArgs(), and resetNonModularOptions().
1.8.6