14 #ifndef LLVM_CLANG_LIB_CODEGEN_TARGETINFO_H 15 #define LLVM_CLANG_LIB_CODEGEN_TARGETINFO_H 22 #include "llvm/ADT/SmallString.h" 23 #include "llvm/ADT/StringRef.h" 38 class CodeGenFunction;
74 virtual unsigned getSizeOfUnwindException()
const;
128 StringRef Constraint,
129 llvm::Type *Ty)
const {
136 std::string &Constraints, std::vector<llvm::Type *> &ResultRegTypes,
137 std::vector<llvm::Type *> &ResultTruncRegTypes,
138 std::vector<CodeGen::LValue> &ResultRegDests, std::string &AsmString,
139 unsigned NumOutputs)
const {}
167 virtual llvm::Constant *
219 virtual void getDependentLibraryOption(llvm::StringRef Lib,
225 llvm::StringRef
Value,
229 virtual unsigned getOpenCLKernelCallingConv()
const;
237 llvm::PointerType *T,
QualType QT)
const;
257 LangAS DestAddr, llvm::Type *DestTy,
258 bool IsNonNull =
false)
const;
265 virtual llvm::Constant *performAddrSpaceCast(
CodeGenModule &CGM,
268 llvm::Type *DestTy)
const;
272 return LangAS::Default;
278 llvm::AtomicOrdering Ordering,
279 llvm::LLVMContext &Ctx)
const;
284 typedef std::pair<llvm::Value *, StringRef>
ValueTy;
292 virtual bool areAllCustomFieldValuesConstant(
const CGBlockInfo &Info) = 0;
307 virtual llvm::Function *
309 llvm::Function *BlockInvokeFunc,
323 #endif // LLVM_CLANG_LIB_CODEGEN_TARGETINFO_H
A (possibly-)qualified type.
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion...
FunctionType - C99 6.7.5.3 - Function Declarators.
C Language Family Type Representation.
Decl - This represents one declaration (or definition), e.g.
const ABIInfo & getABIInfo() const
getABIInfo() - Returns ABI info helper for the target.
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
virtual bool extendPointerWithSExt() const
Controls whether __builtin_extend_pointer should sign-extend pointers to uint64_t or zero-extend them...
Represents a variable declaration or definition.
virtual StringRef getARCRetainAutoreleasedReturnValueMarker() const
Retrieve the address of a function to call immediately before calling objc_retainAutoreleasedReturnVa...
LangAS
Defines the address space values used by the address space qualifier of QualType. ...
std::pair< llvm::Value *, StringRef > ValueTy
virtual llvm::Constant * getUBSanFunctionSignature(CodeGen::CodeGenModule &CGM) const
Return a constant used by UBSan as a signature to identify functions possessing type information...
virtual void getDetectMismatchOption(llvm::StringRef Name, llvm::StringRef Value, llvm::SmallString< 32 > &Opt) const
Gets the linker options necessary to detect object file mismatches on this platform.
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
virtual TargetOpenCLBlockHelper * getTargetOpenCLBlockHelper() const
virtual bool shouldSuppressTailCallsOfRetainAutoreleasedReturnValue() const
Determine whether a call to objc_retainAutoreleasedReturnValue should be marked as 'notail'...
Scope - A scope is a transient data structure that is used while parsing the program.
virtual void setCUDAKernelCallingConvention(const FunctionType *&FT) const
Represents a K&R-style 'int foo()' function, which has no information available about its arguments...
Interface class for filling custom fields of a block literal for OpenCL.
CGBlockInfo - Information to generate a block literal.
TargetCodeGenInfo(ABIInfo *info=nullptr)
virtual bool shouldEmitStaticExternCAliases() const
virtual bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const
Initializes the given DWARF EH register-size table, a char*.
virtual bool doesReturnSlotInterfereWithArgs() const
doesReturnSlotInterfereWithArgs - Return true if the target uses an argument slot for an 'sret' type...
SyncScope
Defines synch scope values used internally by clang.
TargetCodeGenInfo - This class organizes various target-specific codegeneration issues, like target-specific attributes, builtins and so on.
This class organizes the cross-function state that is used while generating LLVM code.
Optional< types::ID > Type
Dataflow Directional Tag Classes.
virtual ~TargetOpenCLBlockHelper()
virtual void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const
setTargetAttributes - Provides a convenient hook to handle extra target-specific attributes for the g...
virtual void emitTargetMD(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const
emitTargetMD - Provides a convenient hook to handle extra target-specific metadata for the given glob...
virtual LangAS getASTAllocaAddressSpace() const
Get the AST address space for alloca.
Provides definitions for the atomic synchronization scopes.
virtual int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const
Determines the DWARF register number for the stack pointer, for exception-handling purposes...
virtual llvm::Type * adjustInlineAsmType(CodeGen::CodeGenFunction &CGF, StringRef Constraint, llvm::Type *Ty) const
Corrects the low-level LLVM type for a given constraint and "usual" type.
TargetOpenCLBlockHelper()
virtual void addReturnRegisterOutputs(CodeGen::CodeGenFunction &CGF, CodeGen::LValue ReturnValue, std::string &Constraints, std::vector< llvm::Type *> &ResultRegTypes, std::vector< llvm::Type *> &ResultTruncRegTypes, std::vector< CodeGen::LValue > &ResultRegDests, std::string &AsmString, unsigned NumOutputs) const
Adds constraints and types for result registers.
ABIInfo - Target specific hooks for defining how a type should be passed or returned from functions...
virtual LangAS getAddrSpaceOfCxaAtexitPtrParam() const
Get address space of pointer parameter for __cxa_atexit.
virtual llvm::Value * decodeReturnAddress(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const
Performs the code-generation required to convert a return address as stored by the system into the ac...
LValue - This represents an lvalue references.
CallArgList - Type for representing both the value and type of arguments in a call.
virtual llvm::Value * encodeReturnAddress(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const
Performs the code-generation required to convert the address of an instruction into a return address ...