003 File Manager
Current Path:
/usr/src/contrib/llvm-project/clang/include/clang/Basic
usr
/
src
/
contrib
/
llvm-project
/
clang
/
include
/
clang
/
Basic
/
📁
..
📄
AArch64SVEACLETypes.def
(7.09 KB)
📄
ABI.h
(5.95 KB)
📄
ASTNode.td
(120 B)
📄
AddressSpaces.h
(2.59 KB)
📄
AlignedAllocation.h
(1.38 KB)
📄
AllDiagnostics.h
(1.44 KB)
📄
Attr.td
(122.78 KB)
📄
AttrDocs.td
(197.8 KB)
📄
AttrKinds.h
(929 B)
📄
AttrSubjectMatchRules.h
(957 B)
📄
AttributeCommonInfo.h
(7.02 KB)
📄
Attributes.h
(1.35 KB)
📄
BitmaskEnum.h
(749 B)
📄
Builtins.def
(71.64 KB)
📄
Builtins.h
(9.13 KB)
📄
BuiltinsAArch64.def
(14.31 KB)
📄
BuiltinsAMDGPU.def
(13.1 KB)
📄
BuiltinsARM.def
(18.6 KB)
📄
BuiltinsBPF.def
(1016 B)
📄
BuiltinsHexagon.def
(6.15 KB)
📄
BuiltinsHexagonDep.def
(117.26 KB)
📄
BuiltinsHexagonMapCustomDep.def
(8.56 KB)
📄
BuiltinsLe64.def
(728 B)
📄
BuiltinsMips.def
(35.51 KB)
📄
BuiltinsNEON.def
(814 B)
📄
BuiltinsNVPTX.def
(27.63 KB)
📄
BuiltinsPPC.def
(21.53 KB)
📄
BuiltinsSVE.def
(786 B)
📄
BuiltinsSystemZ.def
(19.7 KB)
📄
BuiltinsWebAssembly.def
(10.17 KB)
📄
BuiltinsX86.def
(140.49 KB)
📄
BuiltinsX86_64.def
(6.79 KB)
📄
BuiltinsXCore.def
(846 B)
📄
CapturedStmt.h
(662 B)
📄
CharInfo.h
(6.52 KB)
📄
CodeGenOptions.def
(21.65 KB)
📄
CodeGenOptions.h
(14.14 KB)
📄
CommentNodes.td
(1.04 KB)
📄
CommentOptions.h
(1.1 KB)
📄
Cuda.h
(2.3 KB)
📄
DebugInfoOptions.h
(1.72 KB)
📄
DeclNodes.td
(4.72 KB)
📄
Diagnostic.h
(55.73 KB)
📄
Diagnostic.td
(5.29 KB)
📄
DiagnosticAST.h
(903 B)
📄
DiagnosticASTKinds.td
(29.35 KB)
📄
DiagnosticAnalysis.h
(933 B)
📄
DiagnosticAnalysisKinds.td
(405 B)
📄
DiagnosticCategories.h
(757 B)
📄
DiagnosticCategories.td
(480 B)
📄
DiagnosticComment.h
(927 B)
📄
DiagnosticCommentKinds.td
(6.18 KB)
📄
DiagnosticCommonKinds.td
(14.32 KB)
📄
DiagnosticCrossTU.h
(927 B)
📄
DiagnosticCrossTUKinds.td
(889 B)
📄
DiagnosticDocs.td
(1.96 KB)
📄
DiagnosticDriver.h
(921 B)
📄
DiagnosticDriverKinds.td
(25.54 KB)
📄
DiagnosticError.h
(1.98 KB)
📄
DiagnosticFrontend.h
(933 B)
📄
DiagnosticFrontendKinds.td
(13.86 KB)
📄
DiagnosticGroups.td
(59.71 KB)
📄
DiagnosticIDs.h
(12.83 KB)
📄
DiagnosticLex.h
(903 B)
📄
DiagnosticLexKinds.td
(38.36 KB)
📄
DiagnosticOptions.def
(4.58 KB)
📄
DiagnosticOptions.h
(4.21 KB)
📄
DiagnosticParse.h
(915 B)
📄
DiagnosticParseKinds.td
(68.47 KB)
📄
DiagnosticRefactoring.h
(951 B)
📄
DiagnosticRefactoringKinds.td
(1.33 KB)
📄
DiagnosticSema.h
(909 B)
📄
DiagnosticSemaKinds.td
(546.17 KB)
📄
DiagnosticSerialization.h
(962 B)
📄
DiagnosticSerializationKinds.td
(18.08 KB)
📄
ExceptionSpecificationType.h
(2.48 KB)
📄
ExpressionTraits.h
(1.18 KB)
📄
FPOptions.def
(1.16 KB)
📄
Features.def
(11.55 KB)
📄
FileManager.h
(16.39 KB)
📄
FileSystemOptions.h
(924 B)
📄
FileSystemStatCache.h
(3.26 KB)
📄
FixedPoint.h
(8.6 KB)
📄
IdentifierTable.h
(33.75 KB)
📄
JsonSupport.h
(3.69 KB)
📄
LLVM.h
(2.43 KB)
📄
Lambda.h
(1.37 KB)
📄
LangOptions.def
(21.96 KB)
📄
LangOptions.h
(18.78 KB)
📄
LangStandard.h
(3.87 KB)
📄
LangStandards.def
(6.8 KB)
📄
Linkage.h
(4.13 KB)
📄
MSP430Target.def
(7.04 KB)
📄
MacroBuilder.h
(1.34 KB)
📄
Module.h
(24.09 KB)
📄
ObjCRuntime.h
(14.36 KB)
📄
OpenCLExtensionTypes.def
(1.59 KB)
📄
OpenCLExtensions.def
(4.38 KB)
📄
OpenCLImageTypes.def
(4.1 KB)
📄
OpenCLOptions.h
(4.42 KB)
📄
OpenMPKinds.def
(4.58 KB)
📄
OpenMPKinds.h
(9.66 KB)
📄
OperatorKinds.def
(6.56 KB)
📄
OperatorKinds.h
(1.55 KB)
📄
OperatorPrecedence.h
(1.82 KB)
📄
PartialDiagnostic.h
(12.96 KB)
📄
PlistSupport.h
(4.02 KB)
📄
PragmaKinds.h
(1.21 KB)
📄
PrettyStackTrace.h
(1.26 KB)
📄
SanitizerBlacklist.h
(1.73 KB)
📄
SanitizerSpecialCaseList.h
(1.81 KB)
📄
Sanitizers.def
(6.41 KB)
📄
Sanitizers.h
(6.57 KB)
📄
SourceLocation.h
(15.56 KB)
📄
SourceManager.h
(71.11 KB)
📄
SourceManagerInternals.h
(4.27 KB)
📄
Specifiers.h
(12.68 KB)
📄
Stack.h
(1.94 KB)
📄
StmtNodes.td
(10.92 KB)
📄
SyncScope.h
(4.87 KB)
📄
TargetBuiltins.h
(9.18 KB)
📄
TargetCXXABI.h
(12.49 KB)
📄
TargetInfo.h
(54.4 KB)
📄
TargetOptions.h
(3 KB)
📄
TemplateKinds.h
(2.22 KB)
📄
TokenKinds.def
(33.83 KB)
📄
TokenKinds.h
(3.99 KB)
📄
TypeNodes.td
(5.48 KB)
📄
TypeTraits.h
(2.67 KB)
📄
Version.h
(2.23 KB)
📄
Visibility.h
(4.4 KB)
📄
X86Target.def
(5.21 KB)
📄
XRayInstr.h
(1.92 KB)
📄
XRayLists.h
(1.73 KB)
📄
arm_bf16.td
(590 B)
📄
arm_cde.td
(9.29 KB)
📄
arm_fp16.td
(5.79 KB)
📄
arm_mve.td
(70.85 KB)
📄
arm_mve_defs.td
(24.52 KB)
📄
arm_neon.td
(90.63 KB)
📄
arm_neon_incl.td
(13.64 KB)
📄
arm_sve.td
(162.48 KB)
Editing: CodeGenOptions.h
//===--- CodeGenOptions.h ---------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file defines the CodeGenOptions interface. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_BASIC_CODEGENOPTIONS_H #define LLVM_CLANG_BASIC_CODEGENOPTIONS_H #include "clang/Basic/DebugInfoOptions.h" #include "clang/Basic/Sanitizers.h" #include "clang/Basic/XRayInstr.h" #include "llvm/ADT/FloatingPointMode.h" #include "llvm/Support/CodeGen.h" #include "llvm/Support/Regex.h" #include "llvm/Target/TargetOptions.h" #include <map> #include <memory> #include <string> #include <vector> namespace clang { /// Bitfields of CodeGenOptions, split out from CodeGenOptions to ensure /// that this large collection of bitfields is a trivial class type. class CodeGenOptionsBase { public: #define CODEGENOPT(Name, Bits, Default) unsigned Name : Bits; #define ENUM_CODEGENOPT(Name, Type, Bits, Default) #include "clang/Basic/CodeGenOptions.def" protected: #define CODEGENOPT(Name, Bits, Default) #define ENUM_CODEGENOPT(Name, Type, Bits, Default) unsigned Name : Bits; #include "clang/Basic/CodeGenOptions.def" }; /// CodeGenOptions - Track various options which control how the code /// is optimized and passed to the backend. class CodeGenOptions : public CodeGenOptionsBase { public: enum InliningMethod { NormalInlining, // Use the standard function inlining pass. OnlyHintInlining, // Inline only (implicitly) hinted functions. OnlyAlwaysInlining // Only run the always inlining pass. }; enum VectorLibrary { NoLibrary, // Don't use any vector library. Accelerate, // Use the Accelerate framework. MASSV, // IBM MASS vector library. SVML // Intel short vector math library. }; enum ObjCDispatchMethodKind { Legacy = 0, NonLegacy = 1, Mixed = 2 }; enum TLSModel { GeneralDynamicTLSModel, LocalDynamicTLSModel, InitialExecTLSModel, LocalExecTLSModel }; /// Clang versions with different platform ABI conformance. enum class ClangABI { /// Attempt to be ABI-compatible with code generated by Clang 3.8.x /// (SVN r257626). This causes <1 x long long> to be passed in an /// integer register instead of an SSE register on x64_64. Ver3_8, /// Attempt to be ABI-compatible with code generated by Clang 4.0.x /// (SVN r291814). This causes move operations to be ignored when /// determining whether a class type can be passed or returned directly. Ver4, /// Conform to the underlying platform's C and C++ ABIs as closely /// as we can. Latest }; enum StructReturnConventionKind { SRCK_Default, // No special option was passed. SRCK_OnStack, // Small structs on the stack (-fpcc-struct-return). SRCK_InRegs // Small structs in registers (-freg-struct-return). }; enum ProfileInstrKind { ProfileNone, // Profile instrumentation is turned off. ProfileClangInstr, // Clang instrumentation to generate execution counts // to use with PGO. ProfileIRInstr, // IR level PGO instrumentation in LLVM. ProfileCSIRInstr, // IR level PGO context sensitive instrumentation in LLVM. }; enum EmbedBitcodeKind { Embed_Off, // No embedded bitcode. Embed_All, // Embed both bitcode and commandline in the output. Embed_Bitcode, // Embed just the bitcode in the output. Embed_Marker // Embed a marker as a placeholder for bitcode. }; // This field stores one of the allowed values for the option // -fbasic-block-sections=. The allowed values with this option are: // {"labels", "all", "list=<file>", "none"}. // // "labels": Only generate basic block symbols (labels) for all basic // blocks, do not generate unique sections for basic blocks. // Use the machine basic block id in the symbol name to // associate profile info from virtual address to machine // basic block. // "all" : Generate basic block sections for all basic blocks. // "list=<file>": Generate basic block sections for a subset of basic blocks. // The functions and the machine basic block ids are specified // in the file. // "none": Disable sections/labels for basic blocks. std::string BBSections; enum class FramePointerKind { None, // Omit all frame pointers. NonLeaf, // Keep non-leaf frame pointers. All, // Keep all frame pointers. }; /// The code model to use (-mcmodel). std::string CodeModel; /// The filename with path we use for coverage data files. The runtime /// allows further manipulation with the GCOV_PREFIX and GCOV_PREFIX_STRIP /// environment variables. std::string CoverageDataFile; /// The filename with path we use for coverage notes files. std::string CoverageNotesFile; /// Regexes separated by a semi-colon to filter the files to instrument. std::string ProfileFilterFiles; /// Regexes separated by a semi-colon to filter the files to not instrument. std::string ProfileExcludeFiles; /// The version string to put into coverage files. char CoverageVersion[4]; /// Enable additional debugging information. std::string DebugPass; /// The string to embed in debug information as the current working directory. std::string DebugCompilationDir; /// The string to embed in the debug information for the compile unit, if /// non-empty. std::string DwarfDebugFlags; /// The string containing the commandline for the llvm.commandline metadata, /// if non-empty. std::string RecordCommandLine; std::map<std::string, std::string> DebugPrefixMap; /// The ABI to use for passing floating point arguments. std::string FloatABI; /// The floating-point denormal mode to use. llvm::DenormalMode FPDenormalMode = llvm::DenormalMode::getIEEE(); /// The floating-point denormal mode to use, for float. llvm::DenormalMode FP32DenormalMode = llvm::DenormalMode::getIEEE(); /// The float precision limit to use, if non-empty. std::string LimitFloatPrecision; struct BitcodeFileToLink { /// The filename of the bitcode file to link in. std::string Filename; /// If true, we set attributes functions in the bitcode library according to /// our CodeGenOptions, much as we set attrs on functions that we generate /// ourselves. bool PropagateAttrs = false; /// If true, we use LLVM module internalizer. bool Internalize = false; /// Bitwise combination of llvm::Linker::Flags, passed to the LLVM linker. unsigned LinkFlags = 0; }; /// The files specified here are linked in to the module before optimizations. std::vector<BitcodeFileToLink> LinkBitcodeFiles; /// The user provided name for the "main file", if non-empty. This is useful /// in situations where the input file name does not match the original input /// file, for example with -save-temps. std::string MainFileName; /// The name for the split debug info file used for the DW_AT_[GNU_]dwo_name /// attribute in the skeleton CU. std::string SplitDwarfFile; /// Output filename for the split debug info, not used in the skeleton CU. std::string SplitDwarfOutput; /// The name of the relocation model to use. llvm::Reloc::Model RelocationModel; /// The thread model to use std::string ThreadModel; /// If not an empty string, trap intrinsics are lowered to calls to this /// function instead of to trap instructions. std::string TrapFuncName; /// A list of dependent libraries. std::vector<std::string> DependentLibraries; /// A list of linker options to embed in the object file. std::vector<std::string> LinkerOptions; /// Name of the profile file to use as output for -fprofile-instr-generate, /// -fprofile-generate, and -fcs-profile-generate. std::string InstrProfileOutput; /// Name of the profile file to use with -fprofile-sample-use. std::string SampleProfileFile; /// Name of the profile file to use as input for -fprofile-instr-use std::string ProfileInstrumentUsePath; /// Name of the profile remapping file to apply to the profile data supplied /// by -fprofile-sample-use or -fprofile-instr-use. std::string ProfileRemappingFile; /// Name of the function summary index file to use for ThinLTO function /// importing. std::string ThinLTOIndexFile; /// Name of a file that can optionally be written with minimized bitcode /// to be used as input for the ThinLTO thin link step, which only needs /// the summary and module symbol table (and not, e.g. any debug metadata). std::string ThinLinkBitcodeFile; /// Prefix to use for -save-temps output. std::string SaveTempsFilePrefix; /// Name of file passed with -fcuda-include-gpubinary option to forward to /// CUDA runtime back-end for incorporating them into host-side object file. std::string CudaGpuBinaryFileName; /// The name of the file to which the backend should save YAML optimization /// records. std::string OptRecordFile; /// The regex that filters the passes that should be saved to the optimization /// records. std::string OptRecordPasses; /// The format used for serializing remarks (default: YAML) std::string OptRecordFormat; /// The name of the partition that symbols are assigned to, specified with /// -fsymbol-partition (see https://lld.llvm.org/Partitions.html). std::string SymbolPartition; /// Regular expression to select optimizations for which we should enable /// optimization remarks. Transformation passes whose name matches this /// expression (and support this feature), will emit a diagnostic /// whenever they perform a transformation. This is enabled by the /// -Rpass=regexp flag. std::shared_ptr<llvm::Regex> OptimizationRemarkPattern; /// Regular expression to select optimizations for which we should enable /// missed optimization remarks. Transformation passes whose name matches this /// expression (and support this feature), will emit a diagnostic /// whenever they tried but failed to perform a transformation. This is /// enabled by the -Rpass-missed=regexp flag. std::shared_ptr<llvm::Regex> OptimizationRemarkMissedPattern; /// Regular expression to select optimizations for which we should enable /// optimization analyses. Transformation passes whose name matches this /// expression (and support this feature), will emit a diagnostic /// whenever they want to explain why they decided to apply or not apply /// a given transformation. This is enabled by the -Rpass-analysis=regexp /// flag. std::shared_ptr<llvm::Regex> OptimizationRemarkAnalysisPattern; /// Set of files defining the rules for the symbol rewriting. std::vector<std::string> RewriteMapFiles; /// Set of sanitizer checks that are non-fatal (i.e. execution should be /// continued when possible). SanitizerSet SanitizeRecover; /// Set of sanitizer checks that trap rather than diagnose. SanitizerSet SanitizeTrap; /// List of backend command-line options for -fembed-bitcode. std::vector<uint8_t> CmdArgs; /// A list of all -fno-builtin-* function names (e.g., memset). std::vector<std::string> NoBuiltinFuncs; std::vector<std::string> Reciprocals; /// The preferred width for auto-vectorization transforms. This is intended to /// override default transforms based on the width of the architected vector /// registers. std::string PreferVectorWidth; /// Set of XRay instrumentation kinds to emit. XRayInstrSet XRayInstrumentationBundle; std::vector<std::string> DefaultFunctionAttrs; /// List of dynamic shared object files to be loaded as pass plugins. std::vector<std::string> PassPlugins; /// Path to allowlist file specifying which objects /// (files, functions) should exclusively be instrumented /// by sanitizer coverage pass. std::vector<std::string> SanitizeCoverageAllowlistFiles; /// Path to blocklist file specifying which objects /// (files, functions) listed for instrumentation by sanitizer /// coverage pass should actually not be instrumented. std::vector<std::string> SanitizeCoverageBlocklistFiles; /// Executable and command-line used to create a given CompilerInvocation. /// Most of the time this will be the full -cc1 command. const char *Argv0 = nullptr; ArrayRef<const char *> CommandLineArgs; public: // Define accessors/mutators for code generation options of enumeration type. #define CODEGENOPT(Name, Bits, Default) #define ENUM_CODEGENOPT(Name, Type, Bits, Default) \ Type get##Name() const { return static_cast<Type>(Name); } \ void set##Name(Type Value) { Name = static_cast<unsigned>(Value); } #include "clang/Basic/CodeGenOptions.def" CodeGenOptions(); /// Is this a libc/libm function that is no longer recognized as a /// builtin because a -fno-builtin-* option has been specified? bool isNoBuiltinFunc(const char *Name) const; const std::vector<std::string> &getNoBuiltinFuncs() const { return NoBuiltinFuncs; } /// Check if Clang profile instrumenation is on. bool hasProfileClangInstr() const { return getProfileInstr() == ProfileClangInstr; } /// Check if IR level profile instrumentation is on. bool hasProfileIRInstr() const { return getProfileInstr() == ProfileIRInstr; } /// Check if CS IR level profile instrumentation is on. bool hasProfileCSIRInstr() const { return getProfileInstr() == ProfileCSIRInstr; } /// Check if Clang profile use is on. bool hasProfileClangUse() const { return getProfileUse() == ProfileClangInstr; } /// Check if IR level profile use is on. bool hasProfileIRUse() const { return getProfileUse() == ProfileIRInstr || getProfileUse() == ProfileCSIRInstr; } /// Check if CSIR profile use is on. bool hasProfileCSIRUse() const { return getProfileUse() == ProfileCSIRInstr; } /// Check if type and variable info should be emitted. bool hasReducedDebugInfo() const { return getDebugInfo() >= codegenoptions::DebugInfoConstructor; } }; } // end namespace clang #endif
Upload File
Create Folder