clang
8.0.0
|
#include "CGBlocks.h"
#include "CGCleanup.h"
#include "CGObjCRuntime.h"
#include "CGRecordLayout.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
#include "clang/CodeGen/ConstantInitBuilder.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtObjC.h"
#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/LangOptions.h"
#include "clang/CodeGen/CGFunctionInfo.h"
#include "llvm/ADT/CachedHashString.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/ScopedPrinter.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdio>
Go to the source code of this file.
Functions | |
static llvm::Constant * | getConstantGEP (llvm::LLVMContext &VMContext, llvm::GlobalVariable *C, unsigned idx0, unsigned idx1) |
getConstantGEP() - Help routine to construct simple GEPs. More... | |
static bool | hasObjCExceptionAttribute (ASTContext &Context, const ObjCInterfaceDecl *OID) |
hasObjCExceptionAttribute - Return true if this class or any super class has the objc_exception attribute. More... | |
static llvm::StringMapEntry< llvm::GlobalVariable * > & | GetConstantStringEntry (llvm::StringMap< llvm::GlobalVariable *> &Map, const StringLiteral *Literal, unsigned &StringLength) |
static bool | isWeakLinkedClass (const ObjCInterfaceDecl *ID) |
static Qualifiers::GC | GetGCAttrTypeForType (ASTContext &Ctx, QualType FQT, bool pointee=false) |
static std::string | getBlockLayoutInfoString (const SmallVectorImpl< CGObjCCommonMac::RUN_SKIP > &RunSkipBlockVars, bool HasCopyDisposeHelpers) |
static void | PushProtocolProperties (llvm::SmallPtrSet< const IdentifierInfo *, 16 > &PropertySet, SmallVectorImpl< const ObjCPropertyDecl *> &Properties, const ObjCProtocolDecl *Proto, bool IsClassProperty) |
static bool | hasWeakMember (QualType type) |
static bool | hasMRCWeakIvars (CodeGenModule &CGM, const ObjCImplementationDecl *ID) |
For compatibility, we only want to set the "HasMRCWeakIvars" flag (and actually fill in a layout string) if we really do have any __weak ivars. More... | |
static void | addIfPresent (llvm::DenseSet< llvm::Value *> &S, Address V) |
static llvm::GlobalValue::DLLStorageClassTypes | getStorage (CodeGenModule &CGM, StringRef Name) |
Variables | |
static const int | ModuleVersion = 7 |
anonymous enum |
Enumerator | |
---|---|
kCFTaggedObjectID_Integer |
Definition at line 1982 of file CGObjCMac.cpp.
enum FragileClassFlags |
Definition at line 3355 of file CGObjCMac.cpp.
enum ImageInfoFlags |
EmitImageInfo - Emit the image info marker used to encode some module level information.
See: <rdr://4810609&4810587&4810587> struct IMAGE_INFO { unsigned version; unsigned flags; };
Enumerator | |
---|---|
eImageInfo_FixAndContinue | |
eImageInfo_GarbageCollected | |
eImageInfo_GCOnly | |
eImageInfo_OptimizedByDyld | |
eImageInfo_CorrectedSynthesize | |
eImageInfo_ImageIsSimulated | |
eImageInfo_ClassProperties |
Definition at line 4884 of file CGObjCMac.cpp.
|
strong |
Definition at line 1101 of file CGObjCMac.cpp.
enum NonFragileClassFlags |
Definition at line 3376 of file CGObjCMac.cpp.
|
strong |
Definition at line 735 of file CGObjCMac.cpp.
|
static |
Definition at line 4239 of file CGObjCMac.cpp.
References clang::CodeGen::CodeGenFunction::CurFn, clang::CodeGen::Address::getPointer(), clang::CodeGen::Address::isValid(), clang::CodeGen::CodeGenFunction::NormalCleanupDest, clang::CodeGen::CodeGenFunction::ReturnValue, and clang::CodeGen::CodeGenTypeCache::VoidTy.
|
static |
Definition at line 2804 of file CGObjCMac.cpp.
References clang::CodeGen::CodeGenModule::addCompilerUsedGlobal(), clang::CodeGen::ConstantInitBuilderTemplateBase< Traits >::beginStruct(), clang::ast_matchers::blockDecl, clang::CodeGen::CGBlockInfo::BlockHeaderForcedGapOffset, clang::CodeGen::CGBlockInfo::BlockHeaderForcedGapSize, clang::CodeGen::CodeGenFunction::Builder, clang::BlockDecl::captures(), clang::CodeGen::CodeGenFunction::CGM, clang::ASTContext::CharTy, clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CharUnits::fromQuantity(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCString(), clang::Type::getAs(), clang::CodeGen::CGBlockInfo::getBlockDecl(), clang::CodeGen::CGBlockInfo::getCapture(), clang::TargetInfo::getCharWidth(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::ObjCProtocolDecl::getDefinition(), clang::NamedDecl::getIdentifier(), clang::CodeGen::CGBlockInfo::Capture::getIndex(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::NamedDecl::getName(), clang::ObjCInterfaceDecl::getObjCRuntimeNameAsString(), clang::ObjCProtocolDecl::getObjCRuntimeNameAsString(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::ASTContext::getPointerType(), clang::TargetInfo::getPointerWidth(), clang::CodeGen::CodeGenModule::getTarget(), clang::CodeGen::CodeGenModule::getTriple(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSizeInChars(), clang::ASTContext::Idents, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::Type::isArrayType(), clang::CodeGen::CGBlockInfo::Capture::isConstant(), clang::CodeGen::CGBlockInfo::needsCopyDisposeHelpers(), clang::LangOptions::NonGC, clang::Qualifiers::OCL_None, clang::ObjCProtocolDecl::protocol_begin(), clang::ObjCProtocolDecl::protocol_end(), clang::CodeGen::CGBlockInfo::StructureType, clang::CanQual< T >::withConst(), and clang::CharUnits::Zero().
|
static |
getConstantGEP() - Help routine to construct simple GEPs.
Definition at line 1787 of file CGObjCMac.cpp.
Referenced by GetGCAttrTypeForType().
|
static |
Definition at line 1879 of file CGObjCMac.cpp.
References clang::serialized_diags::create(), clang::CodeGen::CodeGenModule::CreateRuntimeVariable(), clang::CharUnits::fromQuantity(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::StringLiteral::getString(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::IntTy, clang::CodeGen::NotForDefinition, clang::LangOptions::ObjCConstantStringClass, llvm::str(), and clang::CodeGen::Type.
|
static |
Definition at line 2188 of file CGObjCMac.cpp.
References clang::ast_matchers::blockDecl, clang::CodeGen::CGBlockInfo::BlockSize, clang::BlockDecl::captures(), clang::CodeGen::CodeGenTypes::ConvertType(), dump(), clang::RecordDecl::fields(), clang::CharUnits::fromQuantity(), clang::Qualifiers::GCNone, clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getASTRecordLayout(), clang::FieldDecl::getBitWidthValue(), clang::CodeGen::CGBlockInfo::getBlockDecl(), clang::CodeGen::CGBlockInfo::getCapture(), clang::TargetInfo::getCharWidth(), getConstantGEP(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::RecordType::getDecl(), clang::ArrayType::getElementType(), clang::ASTRecordLayout::getFieldOffset(), clang::NamedDecl::getIdentifier(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::ASTContext::getLangOpts(), clang::QualType::getObjCLifetime(), clang::CodeGen::CGBlockInfo::Capture::getOffset(), clang::TargetInfo::getPointerWidth(), clang::CharUnits::getQuantity(), clang::ConstantArrayType::getSize(), clang::CodeGen::CodeGenModule::getTarget(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSize(), clang::ASTContext::getTypeSizeInChars(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::Type::isArrayType(), clang::FieldDecl::isBitField(), clang::Type::isBlockPointerType(), clang::CodeGen::CGBlockInfo::Capture::isConstant(), clang::QualType::isObjCGCStrong(), clang::QualType::isObjCGCWeak(), clang::Type::isObjCObjectPointerType(), clang::Type::isRecordType(), clang::TagDecl::isUnion(), clang::Type::isUnionType(), clang::LangOptions::NonGC, clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, Offset, clang::operator<(), printf(), clang::Qualifiers::Strong, clang::ASTContext::toCharUnitsFromBits(), clang::CodeGen::Type, clang::ast_matchers::type, clang::Qualifiers::Weak, and clang::CharUnits::Zero().
|
static |
Definition at line 6277 of file CGObjCMac.cpp.
Referenced by clang::OverloadedTemplateStorage::begin(), and clang::OverloadedTemplateStorage::end().
|
static |
For compatibility, we only want to set the "HasMRCWeakIvars" flag (and actually fill in a layout string) if we really do have any __weak ivars.
Definition at line 3424 of file CGObjCMac.cpp.
References clang::ObjCInterfaceDecl::all_declared_ivar_begin(), clang::ObjCInterfaceDecl::all_referenced_protocol_begin(), clang::ObjCInterfaceDecl::all_referenced_protocol_end(), clang::CodeGen::ConstantInitBuilderTemplateBase< Traits >::beginStruct(), FragileABI_Class_CompiledByARC, FragileABI_Class_Factory, FragileABI_Class_HasCXXStructors, FragileABI_Class_HasMRCWeakIvars, FragileABI_Class_Hidden, clang::IdentifierTable::get(), clang::ASTContext::getASTObjCImplementationLayout(), clang::ObjCImplDecl::getClassInterface(), clang::CodeGen::CodeGenModule::getContext(), clang::ObjCPropertyDecl::getGetterMethodDecl(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::ObjCImplementationDecl::getName(), clang::ObjCImplementationDecl::getNameAsString(), clang::ObjCIvarDecl::getNextIvar(), clang::ObjCImplementationDecl::getObjCRuntimeNameAsString(), clang::CharUnits::getQuantity(), clang::ObjCPropertyDecl::getSetterMethodDecl(), clang::ASTRecordLayout::getSize(), clang::ObjCInterfaceDecl::getSuperClass(), clang::NamedDecl::getVisibility(), clang::ObjCImplementationDecl::hasDestructors(), clang::ObjCImplementationDecl::hasNonZeroConstructors(), hasWeakMember(), clang::HiddenVisibility, clang::ASTContext::Idents, clang::ObjCContainerDecl::methods(), clang::LangOptions::NonGC, clang::ObjCImplDecl::property_impls(), clang::ObjCPropertyImplDecl::Synthesize, and clang::CharUnits::Zero().
|
static |
hasObjCExceptionAttribute - Return true if this class or any super class has the objc_exception attribute.
Definition at line 1799 of file CGObjCMac.cpp.
Definition at line 3406 of file CGObjCMac.cpp.
References clang::Type::getAs(), clang::QualType::getObjCLifetime(), and clang::Qualifiers::OCL_Weak.
Referenced by hasMRCWeakIvars().
|
static |
Definition at line 2067 of file CGObjCMac.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CallArgList::addFrom(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CodeGenFunction::CurCodeDecl, clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::ASTContext::getCanonicalType(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::ASTContext::getObjCSelType(), clang::CodeGen::Address::getPointer(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCInterfaceDecl::getSuperClass(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::isClassMethod(), clang::CodeGen::ReturnValueSlot::isUnused(), clang::Decl::isWeakImported(), clang::ObjCMethodDecl::parameters(), clang::CodeGen::CodeGenModule::ReturnSlotInterferesWithArgs(), clang::CodeGen::CodeGenModule::ReturnTypeUsesFP2Ret(), clang::CodeGen::CodeGenModule::ReturnTypeUsesFPRet(), and clang::CodeGen::CodeGenModule::ReturnTypeUsesSRet().
|
static |
Definition at line 3153 of file CGObjCMac.cpp.
References clang::NamedDecl::getIdentifier(), P, clang::ObjCContainerDecl::properties(), and clang::ObjCProtocolDecl::protocols().
|
static |
Definition at line 4958 of file CGObjCMac.cpp.