class CGObjCRuntime

Declaration

class CGObjCRuntime { /* full declaration omitted */ };

Description

Implements runtime-specific code generation functions.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:65

Member Variables

protected CodeGen::CodeGenModule& CGM

Method Overview

  • public virtual llvm::Constant * BuildByrefLayout(CodeGen::CodeGenModule & CGM, clang::QualType T)
  • public virtual llvm::Constant * BuildGCBlockLayout(CodeGen::CodeGenModule & CGM, const CodeGen::CGBlockInfo & blockInfo)
  • public virtual llvm::Constant * BuildRCBlockLayout(CodeGen::CodeGenModule & CGM, const CodeGen::CGBlockInfo & blockInfo)
  • protected CGObjCRuntime(CodeGen::CodeGenModule & CGM)
  • public unsigned int ComputeBitfieldBitOffset(CodeGen::CodeGenModule & CGM, const clang::ObjCInterfaceDecl * ID, const clang::ObjCIvarDecl * Ivar)
  • protected uint64_t ComputeIvarBaseOffset(CodeGen::CodeGenModule & CGM, const clang::ObjCInterfaceDecl * OID, const clang::ObjCIvarDecl * Ivar)
  • protected uint64_t ComputeIvarBaseOffset(CodeGen::CodeGenModule & CGM, const clang::ObjCImplementationDecl * OID, const clang::ObjCIvarDecl * Ivar)
  • protected void EmitAtSynchronizedStmt(clang::CodeGen::CodeGenFunction & CGF, const clang::ObjCAtSynchronizedStmt & S, llvm::FunctionCallee syncEnterFn, llvm::FunctionCallee syncExitFn)
  • public virtual void EmitGCMemmoveCollectable(CodeGen::CodeGenFunction & CGF, clang::CodeGen::Address DestPtr, clang::CodeGen::Address SrcPtr, llvm::Value * Size)
  • protected void EmitInitOfCatchParam(clang::CodeGen::CodeGenFunction & CGF, llvm::Value * exn, const clang::VarDecl * paramDecl)
  • public virtual llvm::Value * EmitIvarOffset(CodeGen::CodeGenFunction & CGF, const clang::ObjCInterfaceDecl * Interface, const clang::ObjCIvarDecl * Ivar)
  • public virtual llvm::Value * EmitNSAutoreleasePoolClassRef(clang::CodeGen::CodeGenFunction & CGF)
  • public virtual void EmitObjCGlobalAssign(CodeGen::CodeGenFunction & CGF, llvm::Value * src, clang::CodeGen::Address dest, bool threadlocal = false)
  • public virtual void EmitObjCIvarAssign(CodeGen::CodeGenFunction & CGF, llvm::Value * src, clang::CodeGen::Address dest, llvm::Value * ivarOffset)
  • public virtual void EmitObjCStrongCastAssign(CodeGen::CodeGenFunction & CGF, llvm::Value * src, clang::CodeGen::Address dest)
  • public virtual clang::CodeGen::LValue EmitObjCValueForIvar(CodeGen::CodeGenFunction & CGF, clang::QualType ObjectTy, llvm::Value * BaseValue, const clang::ObjCIvarDecl * Ivar, unsigned int CVRQualifiers)
  • public virtual void EmitObjCWeakAssign(CodeGen::CodeGenFunction & CGF, llvm::Value * src, clang::CodeGen::Address dest)
  • public virtual llvm::Value * EmitObjCWeakRead(CodeGen::CodeGenFunction & CGF, clang::CodeGen::Address AddrWeakObj)
  • public virtual void EmitSynchronizedStmt(CodeGen::CodeGenFunction & CGF, const clang::ObjCAtSynchronizedStmt & S)
  • public virtual void EmitThrowStmt(CodeGen::CodeGenFunction & CGF, const clang::ObjCAtThrowStmt & S, bool ClearInsertionPoint = true)
  • protected void EmitTryCatchStmt(clang::CodeGen::CodeGenFunction & CGF, const clang::ObjCAtTryStmt & S, llvm::FunctionCallee beginCatchFn, llvm::FunctionCallee endCatchFn, llvm::FunctionCallee exceptionRethrowFn)
  • public virtual void EmitTryStmt(CodeGen::CodeGenFunction & CGF, const clang::ObjCAtTryStmt & S)
  • protected clang::CodeGen::LValue EmitValueForIvarAtOffset(CodeGen::CodeGenFunction & CGF, const clang::ObjCInterfaceDecl * OID, llvm::Value * BaseValue, const clang::ObjCIvarDecl * Ivar, unsigned int CVRQualifiers, llvm::Value * Offset)
  • public virtual llvm::FunctionCallee EnumerationMutationFunction()
  • public virtual void GenerateCategory(const clang::ObjCCategoryImplDecl * OCD)
  • public virtual void GenerateClass(const clang::ObjCImplementationDecl * OID)
  • public virtual clang::CodeGen::ConstantAddress GenerateConstantString(const clang::StringLiteral *)
  • public virtual void GenerateDirectMethodPrologue(clang::CodeGen::CodeGenFunction & CGF, llvm::Function * Fn, const clang::ObjCMethodDecl * OMD, const clang::ObjCContainerDecl * CD)
  • public virtual CodeGen::RValue GenerateMessageSend(CodeGen::CodeGenFunction & CGF, clang::CodeGen::ReturnValueSlot ReturnSlot, clang::QualType ResultType, clang::Selector Sel, llvm::Value * Receiver, const clang::CodeGen::CallArgList & CallArgs, const clang::ObjCInterfaceDecl * Class = nullptr, const clang::ObjCMethodDecl * Method = nullptr)
  • public virtual CodeGen::RValue GenerateMessageSendSuper(CodeGen::CodeGenFunction & CGF, clang::CodeGen::ReturnValueSlot ReturnSlot, clang::QualType ResultType, clang::Selector Sel, const clang::ObjCInterfaceDecl * Class, bool isCategoryImpl, llvm::Value * Self, bool IsClassMessage, const clang::CodeGen::CallArgList & CallArgs, const clang::ObjCMethodDecl * Method = nullptr)
  • public virtual llvm::Function * GenerateMethod(const clang::ObjCMethodDecl * OMD, const clang::ObjCContainerDecl * CD)
  • public CodeGen::RValue GeneratePossiblySpecializedMessageSend(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::ReturnValueSlot Return, clang::QualType ResultType, clang::Selector Sel, llvm::Value * Receiver, const clang::CodeGen::CallArgList & Args, const clang::ObjCInterfaceDecl * OID, const clang::ObjCMethodDecl * Method, bool isClassMessage)
  • public virtual void GenerateProtocol(const clang::ObjCProtocolDecl * OPD)
  • public virtual llvm::Value * GenerateProtocolRef(clang::CodeGen::CodeGenFunction & CGF, const clang::ObjCProtocolDecl * OPD)
  • public virtual clang::CodeGen::Address GetAddrOfSelector(clang::CodeGen::CodeGenFunction & CGF, clang::Selector Sel)
  • public virtual llvm::Value * GetClass(clang::CodeGen::CodeGenFunction & CGF, const clang::ObjCInterfaceDecl * OID)
  • public virtual llvm::FunctionCallee GetCppAtomicObjectGetFunction()
  • public virtual llvm::FunctionCallee GetCppAtomicObjectSetFunction()
  • public virtual llvm::Constant * GetEHType(clang::QualType T)
  • public virtual llvm::FunctionCallee GetGetStructFunction()
  • public virtual llvm::FunctionCallee GetOptimizedPropertySetFunction(bool atomic, bool copy)
  • public virtual llvm::Constant * GetOrEmitProtocol(const clang::ObjCProtocolDecl * PD)
  • public virtual llvm::FunctionCallee GetPropertyGetFunction()
  • public virtual llvm::FunctionCallee GetPropertySetFunction()
  • public std::vector<const ObjCProtocolDecl *> GetRuntimeProtocolList(ObjCProtocolDecl::protocol_iterator begin, ObjCProtocolDecl::protocol_iterator end)
  • public virtual llvm::Value * GetSelector(clang::CodeGen::CodeGenFunction & CGF, const clang::ObjCMethodDecl * Method)
  • public virtual llvm::Value * GetSelector(clang::CodeGen::CodeGenFunction & CGF, clang::Selector Sel)
  • public virtual llvm::FunctionCallee GetSetStructFunction()
  • public virtual llvm::Function * ModuleInitFunction()
  • public virtual void RegisterAlias(const clang::ObjCCompatibleAliasDecl * OAD)
  • public bool canMessageReceiverBeNull(clang::CodeGen::CodeGenFunction & CGF, const clang::ObjCMethodDecl * method, bool isSuper, const clang::ObjCInterfaceDecl * classReceiver, llvm::Value * receiver)
  • public static void destroyCalleeDestroyedArguments(clang::CodeGen::CodeGenFunction & CGF, const clang::ObjCMethodDecl * method, const clang::CodeGen::CallArgList & callArgs)
  • public virtual clang::CodeGen::CatchTypeInfo getCatchAllTypeInfo()
  • public clang::CodeGen::CGObjCRuntime::MessageSendInfo getMessageSendInfo(const clang::ObjCMethodDecl * method, clang::QualType resultType, clang::CodeGen::CallArgList & callArgs)
  • public virtual std::string getRCBlockLayoutStr(CodeGen::CodeGenModule & CGM, const clang::CodeGen::CGBlockInfo & blockInfo)
  • public std::string getSymbolNameForMethod(const clang::ObjCMethodDecl * method, bool includeCategoryName = true)
  • public static bool isWeakLinkedClass(const clang::ObjCInterfaceDecl * cls)
  • public virtual ~CGObjCRuntime()

Methods

virtual llvm::Constant* BuildByrefLayout(
    CodeGen::CodeGenModule& CGM,
    clang::QualType T)

Description

Returns an i8* which points to the byref layout information.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:326

Parameters

CodeGen::CodeGenModule& CGM
clang::QualType T

virtual llvm::Constant* BuildGCBlockLayout(
    CodeGen::CodeGenModule& CGM,
    const CodeGen::CGBlockInfo& blockInfo)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:316

Parameters

CodeGen::CodeGenModule& CGM
const CodeGen::CGBlockInfo& blockInfo

virtual llvm::Constant* BuildRCBlockLayout(
    CodeGen::CodeGenModule& CGM,
    const CodeGen::CGBlockInfo& blockInfo)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:318

Parameters

CodeGen::CodeGenModule& CGM
const CodeGen::CGBlockInfo& blockInfo

CGObjCRuntime(CodeGen::CodeGenModule& CGM)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:68

Parameters

CodeGen::CodeGenModule& CGM

unsigned int ComputeBitfieldBitOffset(
    CodeGen::CodeGenModule& CGM,
    const clang::ObjCInterfaceDecl* ID,
    const clang::ObjCIvarDecl* Ivar)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:361

Parameters

CodeGen::CodeGenModule& CGM
const clang::ObjCInterfaceDecl* ID
const clang::ObjCIvarDecl* Ivar

uint64_t ComputeIvarBaseOffset(
    CodeGen::CodeGenModule& CGM,
    const clang::ObjCInterfaceDecl* OID,
    const clang::ObjCIvarDecl* Ivar)

Description

Compute an offset to the given ivar, suitable for passing to EmitValueForIvarAtOffset. Note that the correct handling of bit-fields is carefully coordinated by these two, use caution! The latter overload is suitable for computing the offset of a sythesized ivar.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:80

Parameters

CodeGen::CodeGenModule& CGM
const clang::ObjCInterfaceDecl* OID
const clang::ObjCIvarDecl* Ivar

uint64_t ComputeIvarBaseOffset(
    CodeGen::CodeGenModule& CGM,
    const clang::ObjCImplementationDecl* OID,
    const clang::ObjCIvarDecl* Ivar)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:83

Parameters

CodeGen::CodeGenModule& CGM
const clang::ObjCImplementationDecl* OID
const clang::ObjCIvarDecl* Ivar

void EmitAtSynchronizedStmt(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::ObjCAtSynchronizedStmt& S,
    llvm::FunctionCallee syncEnterFn,
    llvm::FunctionCallee syncExitFn)

Description

Emits an @ synchronize() statement, using the \p syncEnterFn and\p syncExitFn arguments as the functions called to lock and unlock the object. This function can be called by subclasses that use zero-cost exception handling.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:112

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::ObjCAtSynchronizedStmt& S
llvm::FunctionCallee syncEnterFn
llvm::FunctionCallee syncExitFn

virtual void EmitGCMemmoveCollectable(
    CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::Address DestPtr,
    clang::CodeGen::Address SrcPtr,
    llvm::Value* Size)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:312

Parameters

CodeGen::CodeGenFunction& CGF
clang::CodeGen::Address DestPtr
clang::CodeGen::Address SrcPtr
llvm::Value* Size

void EmitInitOfCatchParam(
    clang::CodeGen::CodeGenFunction& CGF,
    llvm::Value* exn,
    const clang::VarDecl* paramDecl)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:105

Parameters

clang::CodeGen::CodeGenFunction& CGF
llvm::Value* exn
const clang::VarDecl* paramDecl

virtual llvm::Value* EmitIvarOffset(
    CodeGen::CodeGenFunction& CGF,
    const clang::ObjCInterfaceDecl* Interface,
    const clang::ObjCIvarDecl* Ivar)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:309

Parameters

CodeGen::CodeGenFunction& CGF
const clang::ObjCInterfaceDecl* Interface
const clang::ObjCIvarDecl* Ivar

virtual llvm::Value*
EmitNSAutoreleasePoolClassRef(
    clang::CodeGen::CodeGenFunction& CGF)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:276

Parameters

clang::CodeGen::CodeGenFunction& CGF

virtual void EmitObjCGlobalAssign(
    CodeGen::CodeGenFunction& CGF,
    llvm::Value* src,
    clang::CodeGen::Address dest,
    bool threadlocal = false)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:295

Parameters

CodeGen::CodeGenFunction& CGF
llvm::Value* src
clang::CodeGen::Address dest
bool threadlocal = false

virtual void EmitObjCIvarAssign(
    CodeGen::CodeGenFunction& CGF,
    llvm::Value* src,
    clang::CodeGen::Address dest,
    llvm::Value* ivarOffset)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:298

Parameters

CodeGen::CodeGenFunction& CGF
llvm::Value* src
clang::CodeGen::Address dest
llvm::Value* ivarOffset

virtual void EmitObjCStrongCastAssign(
    CodeGen::CodeGenFunction& CGF,
    llvm::Value* src,
    clang::CodeGen::Address dest)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:301

Parameters

CodeGen::CodeGenFunction& CGF
llvm::Value* src
clang::CodeGen::Address dest

virtual clang::CodeGen::LValue
EmitObjCValueForIvar(
    CodeGen::CodeGenFunction& CGF,
    clang::QualType ObjectTy,
    llvm::Value* BaseValue,
    const clang::ObjCIvarDecl* Ivar,
    unsigned int CVRQualifiers)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:304

Parameters

CodeGen::CodeGenFunction& CGF
clang::QualType ObjectTy
llvm::Value* BaseValue
const clang::ObjCIvarDecl* Ivar
unsigned int CVRQualifiers

virtual void EmitObjCWeakAssign(
    CodeGen::CodeGenFunction& CGF,
    llvm::Value* src,
    clang::CodeGen::Address dest)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:293

Parameters

CodeGen::CodeGenFunction& CGF
llvm::Value* src
clang::CodeGen::Address dest

virtual llvm::Value* EmitObjCWeakRead(
    CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::Address AddrWeakObj)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:291

Parameters

CodeGen::CodeGenFunction& CGF
clang::CodeGen::Address AddrWeakObj

virtual void EmitSynchronizedStmt(
    CodeGen::CodeGenFunction& CGF,
    const clang::ObjCAtSynchronizedStmt& S)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:284

Parameters

CodeGen::CodeGenFunction& CGF
const clang::ObjCAtSynchronizedStmt& S

virtual void EmitThrowStmt(
    CodeGen::CodeGenFunction& CGF,
    const clang::ObjCAtThrowStmt& S,
    bool ClearInsertionPoint = true)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:288

Parameters

CodeGen::CodeGenFunction& CGF
const clang::ObjCAtThrowStmt& S
bool ClearInsertionPoint = true

void EmitTryCatchStmt(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::ObjCAtTryStmt& S,
    llvm::FunctionCallee beginCatchFn,
    llvm::FunctionCallee endCatchFn,
    llvm::FunctionCallee exceptionRethrowFn)

Description

Emits a try / catch statement. This function is intended to be called by subclasses, and provides a generic mechanism for generating these, which should be usable by all runtimes. The caller must provide the functions to call when entering and exiting a @ catch() block, and the function used to rethrow exceptions. If the begin and end catch functions are NULL, then the function assumes that the EH personality function provides the thrown object directly.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:100

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::ObjCAtTryStmt& S
llvm::FunctionCallee beginCatchFn
llvm::FunctionCallee endCatchFn
llvm::FunctionCallee exceptionRethrowFn

virtual void EmitTryStmt(
    CodeGen::CodeGenFunction& CGF,
    const clang::ObjCAtTryStmt& S)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:286

Parameters

CodeGen::CodeGenFunction& CGF
const clang::ObjCAtTryStmt& S

clang::CodeGen::LValue EmitValueForIvarAtOffset(
    CodeGen::CodeGenFunction& CGF,
    const clang::ObjCInterfaceDecl* OID,
    llvm::Value* BaseValue,
    const clang::ObjCIvarDecl* Ivar,
    unsigned int CVRQualifiers,
    llvm::Value* Offset)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:87

Parameters

CodeGen::CodeGenFunction& CGF
const clang::ObjCInterfaceDecl* OID
llvm::Value* BaseValue
const clang::ObjCIvarDecl* Ivar
unsigned int CVRQualifiers
llvm::Value* Offset

virtual llvm::FunctionCallee
EnumerationMutationFunction()

Description

EnumerationMutationFunction - Return the function that's called by the compiler when a mutation is detected during foreach iteration.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:282

virtual void GenerateCategory(
    const clang::ObjCCategoryImplDecl* OCD)

Description

Generate a category. A category contains a list of methods (and accompanying metadata) and a list of protocols.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:155

Parameters

const clang::ObjCCategoryImplDecl* OCD

virtual void GenerateClass(
    const clang::ObjCImplementationDecl* OID)

Description

Generate a class structure for this class.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:158

Parameters

const clang::ObjCImplementationDecl* OID

virtual clang::CodeGen::ConstantAddress
GenerateConstantString(
    const clang::StringLiteral*)

Description

Generate a constant string object.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:151

Parameters

const clang::StringLiteral*

virtual void GenerateDirectMethodPrologue(
    clang::CodeGen::CodeGenFunction& CGF,
    llvm::Function* Fn,
    const clang::ObjCMethodDecl* OMD,
    const clang::ObjCContainerDecl* CD)

Description

Generates prologue for direct Objective-C Methods.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:244

Parameters

clang::CodeGen::CodeGenFunction& CGF
llvm::Function* Fn
const clang::ObjCMethodDecl* OMD
const clang::ObjCContainerDecl* CD

virtual CodeGen::RValue GenerateMessageSend(
    CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::ReturnValueSlot ReturnSlot,
    clang::QualType ResultType,
    clang::Selector Sel,
    llvm::Value* Receiver,
    const clang::CodeGen::CallArgList& CallArgs,
    const clang::ObjCInterfaceDecl* Class =
        nullptr,
    const clang::ObjCMethodDecl* Method = nullptr)

Description

Generate an Objective-C message send operation.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:168

Parameters

CodeGen::CodeGenFunction& CGF
clang::CodeGen::ReturnValueSlot ReturnSlot
clang::QualType ResultType
clang::Selector Sel
llvm::Value* Receiver
const clang::CodeGen::CallArgList& CallArgs
const clang::ObjCInterfaceDecl* Class = nullptr
const clang::ObjCMethodDecl* Method = nullptr
- The method being called, this may be null if synthesizing a property setter or getter.

virtual CodeGen::RValue GenerateMessageSendSuper(
    CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::ReturnValueSlot ReturnSlot,
    clang::QualType ResultType,
    clang::Selector Sel,
    const clang::ObjCInterfaceDecl* Class,
    bool isCategoryImpl,
    llvm::Value* Self,
    bool IsClassMessage,
    const clang::CodeGen::CallArgList& CallArgs,
    const clang::ObjCMethodDecl* Method = nullptr)

Description

Generate an Objective-C message send operation to the super class initiated in a method for Class and with the given Self object.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:199

Parameters

CodeGen::CodeGenFunction& CGF
clang::CodeGen::ReturnValueSlot ReturnSlot
clang::QualType ResultType
clang::Selector Sel
const clang::ObjCInterfaceDecl* Class
bool isCategoryImpl
llvm::Value* Self
bool IsClassMessage
const clang::CodeGen::CallArgList& CallArgs
const clang::ObjCMethodDecl* Method = nullptr
- The method being called, this may be null if synthesizing a property setter or getter.

virtual llvm::Function* GenerateMethod(
    const clang::ObjCMethodDecl* OMD,
    const clang::ObjCContainerDecl* CD)

Description

Generate a function preamble for a method with the specified types.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:240

Parameters

const clang::ObjCMethodDecl* OMD
const clang::ObjCContainerDecl* CD

CodeGen::RValue
GeneratePossiblySpecializedMessageSend(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::ReturnValueSlot Return,
    clang::QualType ResultType,
    clang::Selector Sel,
    llvm::Value* Receiver,
    const clang::CodeGen::CallArgList& Args,
    const clang::ObjCInterfaceDecl* OID,
    const clang::ObjCMethodDecl* Method,
    bool isClassMessage)

Description

Generate an Objective-C message send operation. This variant allows for the call to be substituted with an optimized variant.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:182

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::CodeGen::ReturnValueSlot Return
clang::QualType ResultType
clang::Selector Sel
llvm::Value* Receiver
const clang::CodeGen::CallArgList& Args
const clang::ObjCInterfaceDecl* OID
const clang::ObjCMethodDecl* Method
bool isClassMessage

virtual void GenerateProtocol(
    const clang::ObjCProtocolDecl* OPD)

Description

Generate the named protocol. Protocols contain method metadata but no implementations.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:227

Parameters

const clang::ObjCProtocolDecl* OPD

virtual llvm::Value* GenerateProtocolRef(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::ObjCProtocolDecl* OPD)

Description

Emit the code to return the named protocol as an object, as in a @ protocol expression.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:222

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::ObjCProtocolDecl* OPD

virtual clang::CodeGen::Address GetAddrOfSelector(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::Selector Sel)

Description

Get the address of a selector for the specified name and type values. This is a rarely-used language extension, but sadly it exists. The result should have the LLVM type for a pointer to ASTContext::getObjCSelType().

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:136

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::Selector Sel

virtual llvm::Value* GetClass(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::ObjCInterfaceDecl* OID)

Description

GetClass - Return a reference to the class for the given interface decl.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:272

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::ObjCInterfaceDecl* OID

virtual llvm::FunctionCallee
GetCppAtomicObjectGetFunction()

Description

API for atomic copying of qualified aggregates with non-trivial copy assignment (c++) in getter.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:268

virtual llvm::FunctionCallee
GetCppAtomicObjectSetFunction()

Description

API for atomic copying of qualified aggregates with non-trivial copy assignment (c++) in setter.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:265

virtual llvm::Constant* GetEHType(
    clang::QualType T)

Description

Get the type constant to catch for the given ObjC pointer type. This is used externally to implement catching ObjC types in C++. Runtimes which don't support this should add the appropriate error to Sema.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:146

Parameters

clang::QualType T

virtual llvm::FunctionCallee
GetGetStructFunction()

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:260

virtual llvm::FunctionCallee
GetOptimizedPropertySetFunction(bool atomic,
                                bool copy)

Description

Return the runtime function for optimized setting properties.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:256

Parameters

bool atomic
bool copy

virtual llvm::Constant* GetOrEmitProtocol(
    const clang::ObjCProtocolDecl* PD)

Description

GetOrEmitProtocol - Get the protocol object for the given declaration, emitting it if necessary. The return value has type ProtocolPtrTy.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:232

Parameters

const clang::ObjCProtocolDecl* PD

virtual llvm::FunctionCallee
GetPropertyGetFunction()

Description

Return the runtime function for getting properties.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:250

virtual llvm::FunctionCallee
GetPropertySetFunction()

Description

Return the runtime function for setting properties.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:253

std::vector<const ObjCProtocolDecl*>
GetRuntimeProtocolList(
    ObjCProtocolDecl::protocol_iterator begin,
    ObjCProtocolDecl::protocol_iterator end)

Description

Walk the list of protocol references from a class, category or protocol to traverse the DAG formed from it's inheritance hierarchy. Find the list of protocols that ends each walk at either a runtime protocol or a non-runtime protocol with no parents. For the common case of just a list of standard runtime protocols this just returns the same list that was passed in.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:217

Parameters

ObjCProtocolDecl::protocol_iterator begin
ObjCProtocolDecl::protocol_iterator end

virtual llvm::Value* GetSelector(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::ObjCMethodDecl* Method)

Description

Get a typed selector.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:139

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::ObjCMethodDecl* Method

virtual llvm::Value* GetSelector(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::Selector Sel)

Description

Get a selector for the specified name and type values. The result should have the LLVM type for ASTContext::getObjCSelType().

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:129

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::Selector Sel

virtual llvm::FunctionCallee
GetSetStructFunction()

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:262

virtual llvm::Function* ModuleInitFunction()

Description

Generate the function required to register all Objective-C components in this compilation unit with the runtime library.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:125

virtual void RegisterAlias(
    const clang::ObjCCompatibleAliasDecl* OAD)

Description

Register an class alias.

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:161

Parameters

const clang::ObjCCompatibleAliasDecl* OAD

bool canMessageReceiverBeNull(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::ObjCMethodDecl* method,
    bool isSuper,
    const clang::ObjCInterfaceDecl* classReceiver,
    llvm::Value* receiver)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:341

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::ObjCMethodDecl* method
bool isSuper
const clang::ObjCInterfaceDecl* classReceiver
llvm::Value* receiver

static void destroyCalleeDestroyedArguments(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::ObjCMethodDecl* method,
    const clang::CodeGen::CallArgList& callArgs)

Description

Destroy the callee-destroyed arguments of the given method, if it has any. Used for nil-receiver paths in message sends. Never does anything if the method does not satisfy hasParamDestroyedInCallee().

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:355

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::ObjCMethodDecl* method
const clang::CodeGen::CallArgList& callArgs
- just the formal arguments, not including implicit arguments such as self and cmd

virtual clang::CodeGen::CatchTypeInfo
getCatchAllTypeInfo()

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:148

clang::CodeGen::CGObjCRuntime::MessageSendInfo
getMessageSendInfo(
    const clang::ObjCMethodDecl* method,
    clang::QualType resultType,
    clang::CodeGen::CallArgList& callArgs)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:338

Parameters

const clang::ObjCMethodDecl* method
clang::QualType resultType
clang::CodeGen::CallArgList& callArgs

virtual std::string getRCBlockLayoutStr(
    CodeGen::CodeGenModule& CGM,
    const clang::CodeGen::CGBlockInfo& blockInfo)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:320

Parameters

CodeGen::CodeGenModule& CGM
const clang::CodeGen::CGBlockInfo& blockInfo

std::string getSymbolNameForMethod(
    const clang::ObjCMethodDecl* method,
    bool includeCategoryName = true)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:120

Parameters

const clang::ObjCMethodDecl* method
bool includeCategoryName = true

static bool isWeakLinkedClass(
    const clang::ObjCInterfaceDecl* cls)

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:346

Parameters

const clang::ObjCInterfaceDecl* cls

virtual ~CGObjCRuntime()

Declared at: clang/lib/CodeGen/CGObjCRuntime.h:118