clang API Documentation

Public Types | Public Member Functions | Public Attributes
clang::CodeGenOptions Class Reference

#include <CodeGenOptions.h>

Collaboration diagram for clang::CodeGenOptions:
Collaboration graph
[legend]

List of all members.

Public Types

enum  InliningMethod { NoInlining, NormalInlining, OnlyAlwaysInlining }
enum  ObjCDispatchMethodKind { Legacy = 0, NonLegacy = 1, Mixed = 2 }
enum  DebugInfoKind { NoDebugInfo, DebugLineTablesOnly, LimitedDebugInfo, FullDebugInfo }

Public Member Functions

 CodeGenOptions ()
ObjCDispatchMethodKind getObjCDispatchMethod () const

Public Attributes

unsigned AsmVerbose: 1
unsigned ObjCAutoRefCountExceptions: 1
 Whether ARC should be EH-safe.
unsigned CUDAIsDevice: 1
 Set when compiling for CUDA device.
unsigned CXAAtExit: 1
 Use __cxa_atexit for calling destructors.
unsigned CXXCtorDtorAliases: 1
unsigned DataSections: 1
 Set when -fdata-sections is enabled.
unsigned DisableFPElim: 1
 Set when -fomit-frame-pointer is enabled.
unsigned DisableLLVMOpts: 1
unsigned DisableRedZone: 1
 Set when -mno-red-zone is enabled.
unsigned DisableTailCalls: 1
 Do not emit tail calls.
unsigned EmitDeclMetadata: 1
unsigned EmitGcovArcs: 1
 Emit coverage data files, aka. GCDA.
unsigned EmitGcovNotes: 1
 Emit coverage "notes" files, aka GCNO.
unsigned ForbidGuardVariables: 1
unsigned FunctionSections: 1
 Set when -ffunction-sections is enabled.
unsigned HiddenWeakTemplateVTables: 1
 template classes with hidden visibility
unsigned HiddenWeakVTables: 1
unsigned InstrumentFunctions: 1
unsigned InstrumentForProfiling: 1
 Set when -pg is enabled.
unsigned LessPreciseFPMAD: 1
unsigned MergeAllConstants: 1
 Merge identical constants.
unsigned NoCommon: 1
 Set when -fno-common or C++ is enabled.
unsigned NoDwarf2CFIAsm: 1
 Set when -fno-dwarf2-cfi-asm is enabled.
unsigned NoDwarfDirectoryAsm: 1
unsigned NoExecStack: 1
 Set when -Wa,--noexecstack is enabled.
unsigned NoGlobalMerge: 1
 Set when -mno-global-merge is enabled.
unsigned NoImplicitFloat: 1
 Set when -mno-implicit-float is enabled.
unsigned NoInfsFPMath: 1
 Assume FP arguments, results not +-Inf.
unsigned NoInline: 1
unsigned NoNaNsFPMath: 1
 Assume FP arguments, results not NaN.
unsigned NoZeroInitializedInBSS: 1
unsigned ObjCDispatchMethod: 2
 Method of Objective-C dispatch to use.
unsigned ObjCRuntimeHasARC: 1
 The target runtime supports ARC natively.
unsigned ObjCRuntimeHasTerminate: 1
 The ObjC runtime has objc_terminate.
unsigned OmitLeafFramePointer: 1
unsigned OptimizationLevel: 3
 The -O[0-4] option specified.
unsigned OptimizeSize: 2
 If -Os (==1) or -Oz (==2) is specified.
unsigned RelaxAll: 1
 Relax all machine code instructions.
unsigned RelaxedAliasing: 1
 Set when -fno-strict-aliasing is enabled.
unsigned SaveTempLabels: 1
 Save temporary labels.
unsigned SimplifyLibCalls: 1
 Set when -fbuiltin is enabled.
unsigned SoftFloat: 1
unsigned StrictEnums: 1
 Optimize based on strict enum definition.
unsigned TimePasses: 1
 Set when -ftime-report is enabled.
unsigned UnitAtATime: 1
unsigned UnrollLoops: 1
 Control whether loops are unrolled.
unsigned UnsafeFPMath: 1
 Allow unsafe floating point optzns.
unsigned UnwindTables: 1
 Emit unwind tables.
unsigned UseRegisterSizedBitfieldAccess: 1
unsigned VerifyModule: 1
unsigned StackRealignment: 1
unsigned StackAlignment
std::string CodeModel
 The code model to use (-mcmodel).
std::string CoverageFile
std::string DebugPass
 Enable additional debugging information.
std::string DebugCompilationDir
 The string to embed in debug information as the current working directory.
DebugInfoKind DebugInfo
 The kind of generated debug info.
std::string DwarfDebugFlags
std::string FloatABI
 The ABI to use for passing floating point arguments.
std::string LimitFloatPrecision
 The float precision limit to use, if non-empty.
std::string LinkBitcodeFile
 The name of the bitcode file to link before optzns.
InliningMethod Inlining
 The kind of inlining to perform.
std::string MainFileName
std::string RelocationModel
 The name of the relocation model to use.
std::string TrapFuncName
std::vector< std::string > BackendOptions
 A list of command-line options to forward to the LLVM backend.
unsigned NumRegisterParameters
unsigned char BoundsChecking
 The run-time penalty for bounds checking, or 0 to disable.

Detailed Description

CodeGenOptions - Track various options which control how the code is optimized and passed to the backend.

Definition at line 24 of file CodeGenOptions.h.


Member Enumeration Documentation

Enumerator:
NoDebugInfo 
DebugLineTablesOnly 
LimitedDebugInfo 
FullDebugInfo 

Definition at line 38 of file CodeGenOptions.h.

Enumerator:
NoInlining 
NormalInlining 
OnlyAlwaysInlining 

Definition at line 26 of file CodeGenOptions.h.

Enumerator:
Legacy 
NonLegacy 
Mixed 

Definition at line 32 of file CodeGenOptions.h.


Constructor & Destructor Documentation

clang::CodeGenOptions::CodeGenOptions ( ) [inline]

Member Function Documentation

ObjCDispatchMethodKind clang::CodeGenOptions::getObjCDispatchMethod ( ) const [inline]

Definition at line 237 of file CodeGenOptions.h.

References ObjCDispatchMethod.

Referenced by CodeGenOptsToArgs().


Member Data Documentation

-dA, -fverbose-asm.

Definition at line 47 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

std::vector<std::string> clang::CodeGenOptions::BackendOptions

A list of command-line options to forward to the LLVM backend.

Definition at line 169 of file CodeGenOptions.h.

Referenced by CodeGenOptsToArgs(), and ParseCodeGenArgs().

The run-time penalty for bounds checking, or 0 to disable.

Definition at line 176 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

The code model to use (-mcmodel).

Definition at line 125 of file CodeGenOptions.h.

Referenced by CodeGenOptsToArgs(), and ParseCodeGenArgs().

The filename with path we use for coverage files. The extension will be replaced.

Definition at line 129 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

Use __cxa_atexit for calling destructors.

Definition at line 50 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

Emit complete ctors/dtors as linker aliases to base ctors when possible.

Definition at line 51 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

Set when -fdata-sections is enabled.

Definition at line 53 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

The string to embed in debug information as the current working directory.

Definition at line 135 of file CodeGenOptions.h.

Referenced by CodeGenOptsToArgs(), and ParseCodeGenArgs().

Enable additional debugging information.

Definition at line 132 of file CodeGenOptions.h.

Referenced by CodeGenOptsToArgs(), and ParseCodeGenArgs().

Set when -fomit-frame-pointer is enabled.

Definition at line 54 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

Don't run any optimizations, for use in getting .bc files that correspond to the internal state before optimizations are done.

Definition at line 55 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

Set when -mno-red-zone is enabled.

Definition at line 59 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), and ParseCodeGenArgs().

Do not emit tail calls.

Definition at line 60 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

The string to embed in the debug information for the compile unit, if non-empty.

Definition at line 142 of file CodeGenOptions.h.

Referenced by CodeGenOptsToArgs(), ParseCodeGenArgs(), and SetUpDiagnosticLog().

Emit special metadata indicating what Decl* various IR entities came from. Only useful when running CodeGen as a subroutine.

Definition at line 61 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), and clang::CodeGen::CodeGenFunction::FinishFunction().

Emit coverage data files, aka. GCDA.

Definition at line 65 of file CodeGenOptions.h.

Referenced by clang::CodeGen::CodeGenModule::CodeGenModule(), CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

Emit coverage "notes" files, aka GCNO.

Definition at line 66 of file CodeGenOptions.h.

Referenced by clang::CodeGen::CodeGenModule::CodeGenModule(), CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

The ABI to use for passing floating point arguments.

Definition at line 145 of file CodeGenOptions.h.

Referenced by CodeGenOptsToArgs(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), and ParseCodeGenArgs().

Issue errors if C++ guard variables are required

Definition at line 67 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), clang::CodeGen::CodeGenFunction::EmitCXXGuardedInit(), and ParseCodeGenArgs().

Set when -ffunction-sections is enabled.

Definition at line 69 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

template classes with hidden visibility

Emit weak vtables and RTTI for

Definition at line 70 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), setThunkVisibility(), and clang::CodeGen::CodeGenModule::setTypeVisibility().

Emit weak vtables, RTTI, and thunks with hidden visibility.

Definition at line 72 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), ParseCodeGenArgs(), setThunkVisibility(), and clang::CodeGen::CodeGenModule::setTypeVisibility().

The kind of inlining to perform.

Definition at line 154 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), and ParseCodeGenArgs().

Set when -pg is enabled.

Definition at line 76 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), ParseCodeGenArgs(), and clang::CodeGen::CodeGenFunction::StartFunction().

Set when -finstrument-functions is enabled.

Definition at line 74 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), ParseCodeGenArgs(), and clang::CodeGen::CodeGenFunction::ShouldInstrumentFunction().

Enable less precise MAD instructions to be generated.

Definition at line 77 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), and ParseCodeGenArgs().

The float precision limit to use, if non-empty.

Definition at line 148 of file CodeGenOptions.h.

Referenced by CodeGenOptsToArgs(), and ParseCodeGenArgs().

The name of the bitcode file to link before optzns.

Definition at line 151 of file CodeGenOptions.h.

Referenced by clang::CodeGenAction::CreateASTConsumer(), and ParseCodeGenArgs().

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.

Definition at line 159 of file CodeGenOptions.h.

Referenced by CodeGenOptsToArgs(), and ParseCodeGenArgs().

Merge identical constants.

Definition at line 79 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), and ParseCodeGenArgs().

Set when -fno-common or C++ is enabled.

Definition at line 80 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), clang::CodeGen::CodeGenModule::GetLLVMLinkageVarDefinition(), and ParseCodeGenArgs().

Set when -fno-dwarf2-cfi-asm is enabled.

Definition at line 81 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

Set when -fno-dwarf-directory-asm is enabled.

Definition at line 82 of file CodeGenOptions.h.

Referenced by CodeGenOptsToArgs(), and ParseCodeGenArgs().

Set when -Wa,--noexecstack is enabled.

Definition at line 84 of file CodeGenOptions.h.

Referenced by CodeGenOptsToArgs(), and ParseCodeGenArgs().

Set when -mno-global-merge is enabled.

Definition at line 85 of file CodeGenOptions.h.

Referenced by CodeGenOptsToArgs(), and ParseCodeGenArgs().

Set when -mno-implicit-float is enabled.

Definition at line 86 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), and ParseCodeGenArgs().

Assume FP arguments, results not +-Inf.

Definition at line 87 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

Set when -fno-inline is enabled. Disables use of the inline keyword.

Definition at line 88 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), ParseCodeGenArgs(), and clang::CodeGen::CodeGenFunction::StartFunction().

Assume FP arguments, results not NaN.

Definition at line 90 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

-fno-zero-initialized-in-bss

Definition at line 91 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

The user specified number of registers to be used for integral arguments, or 0 if unspecified.

Definition at line 173 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), and ParseCodeGenArgs().

Method of Objective-C dispatch to use.

Definition at line 92 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), getObjCDispatchMethod(), and ParseCodeGenArgs().

The ObjC runtime has objc_terminate.

Definition at line 94 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), getTerminateFn(), and ParseCodeGenArgs().

Set when -momit-leaf-frame-pointer is enabled.

Definition at line 95 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

If -Os (==1) or -Oz (==2) is specified.

Definition at line 98 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), and ParseCodeGenArgs().

Relax all machine code instructions.

Definition at line 99 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

Set when -fno-strict-aliasing is enabled.

Definition at line 100 of file CodeGenOptions.h.

Referenced by clang::CodeGen::CodeGenModule::CodeGenModule(), CodeGenOptions(), clang::CodeGen::CodeGenTBAA::getTBAAInfo(), and ParseCodeGenArgs().

The name of the relocation model to use.

Definition at line 162 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

Save temporary labels.

Definition at line 101 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

Set when -fbuiltin is enabled.

Definition at line 102 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), and ParseCodeGenArgs().

-soft-float.

Definition at line 103 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

Overrides default stack alignment, if not 0.

Definition at line 121 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), and ParseCodeGenArgs().

Control whether to permit stack realignment.

Definition at line 119 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), and ParseCodeGenArgs().

Optimize based on strict enum definition.

Definition at line 104 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

Set when -ftime-report is enabled.

Definition at line 105 of file CodeGenOptions.h.

Referenced by CodeGenOptions().

If not an empty string, trap intrinsics are lowered to calls to this function instead of to trap instructions.

Definition at line 166 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

Unused. For mirroring GCC optimization selection.

Definition at line 106 of file CodeGenOptions.h.

Referenced by CodeGenOptions().

Control whether loops are unrolled.

Definition at line 108 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().

Allow unsafe floating point optzns.

Definition at line 109 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), and ParseCodeGenArgs().

Attempt to use register sized accesses to bit-fields in structures, when possible.

Definition at line 114 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), clang::CodeGen::CGBitFieldInfo::MakeInfo(), and ParseCodeGenArgs().

Control whether the module should be run through the LLVM Verifier.

Definition at line 116 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), CodeGenOptsToArgs(), and ParseCodeGenArgs().


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