• Home
  • Raw
  • Download

Lines Matching refs:CGM

45   MicrosoftCXXABI(CodeGenModule &CGM)  in MicrosoftCXXABI()  argument
46 : CGCXXABI(CGM), BaseClassDescriptorType(nullptr), in MicrosoftCXXABI()
221 CGM.getMicrosoftVTableContext().getMethodVFTableLocation(MD); in getThisArgumentTypeForMethod()
319 if (auto *VDispMap = CGM.getModule().getNamedGlobal(MangledName)) in getAddrOfVirtualDisplacementMap()
322 MicrosoftVTableContext &VTContext = CGM.getMicrosoftVTableContext(); in getAddrOfVirtualDisplacementMap()
325 llvm::UndefValue::get(CGM.IntTy)); in getAddrOfVirtualDisplacementMap()
326 Map[0] = llvm::ConstantInt::get(CGM.IntTy, 0); in getAddrOfVirtualDisplacementMap()
335 Map[SrcVBIndex] = llvm::ConstantInt::get(CGM.IntTy, DstVBIndex * 4); in getAddrOfVirtualDisplacementMap()
342 llvm::ArrayType *VDispMapTy = llvm::ArrayType::get(CGM.IntTy, Map.size()); in getAddrOfVirtualDisplacementMap()
349 CGM.getModule(), VDispMapTy, /*Constant=*/true, Linkage, in getAddrOfVirtualDisplacementMap()
380 CodeGenModule &CGM, ArrayRef<const VarDecl *> CXXThreadLocals,
433 return CGM.getTarget().getPointerWidth(/*AddressSpace=*/0) == 64; in isImageRelative()
445 CGM.Int8PtrPtrTy, in getTypeDescriptorType()
446 CGM.Int8PtrTy, in getTypeDescriptorType()
447 llvm::ArrayType::get(CGM.Int8Ty, TypeInfoString.size() + 1)}; in getTypeDescriptorType()
449 llvm::StructType::create(CGM.getLLVMContext(), FieldTypes, TDTypeName); in getTypeDescriptorType()
456 return CGM.IntTy; in getImageRelativeType()
463 getImageRelativeType(CGM.Int8PtrTy), in getBaseClassDescriptorType()
464 CGM.IntTy, in getBaseClassDescriptorType()
465 CGM.IntTy, in getBaseClassDescriptorType()
466 CGM.IntTy, in getBaseClassDescriptorType()
467 CGM.IntTy, in getBaseClassDescriptorType()
468 CGM.IntTy, in getBaseClassDescriptorType()
472 CGM.getLLVMContext(), FieldTypes, "rtti.BaseClassDescriptor"); in getBaseClassDescriptorType()
481 CGM.getLLVMContext(), "rtti.ClassHierarchyDescriptor"); in getClassHierarchyDescriptorType()
483 CGM.IntTy, in getClassHierarchyDescriptorType()
484 CGM.IntTy, in getClassHierarchyDescriptorType()
485 CGM.IntTy, in getClassHierarchyDescriptorType()
497 CGM.getLLVMContext(), "rtti.CompleteObjectLocator"); in getCompleteObjectLocatorType()
499 CGM.IntTy, in getCompleteObjectLocatorType()
500 CGM.IntTy, in getCompleteObjectLocatorType()
501 CGM.IntTy, in getCompleteObjectLocatorType()
502 getImageRelativeType(CGM.Int8PtrTy), in getCompleteObjectLocatorType()
515 if (llvm::GlobalVariable *GV = CGM.getModule().getNamedGlobal(Name)) in getImageBase()
518 return new llvm::GlobalVariable(CGM.getModule(), CGM.Int8Ty, in getImageBase()
529 return llvm::Constant::getNullValue(CGM.IntTy); in getImageRelativeConstant()
532 llvm::ConstantExpr::getPtrToInt(getImageBase(), CGM.IntPtrTy); in getImageRelativeConstant()
534 llvm::ConstantExpr::getPtrToInt(PtrVal, CGM.IntPtrTy); in getImageRelativeConstant()
538 return llvm::ConstantExpr::getTrunc(Diff, CGM.IntTy); in getImageRelativeConstant()
547 return llvm::ConstantInt::get(CGM.IntTy, 0); in getZeroInt()
551 return llvm::Constant::getAllOnesValue(CGM.IntTy); in getAllOnesInt()
575 llvm::Value *VBPOffset = llvm::ConstantInt::get(CGM.IntTy, VBPtrOffset), in GetVBaseOffsetFromVBPtr()
576 *VBTOffset = llvm::ConstantInt::get(CGM.IntTy, VBTableOffset); in GetVBaseOffsetFromVBPtr()
675 CGM.IntTy, // Flags in getCatchableTypeType()
676 getImageRelativeType(CGM.Int8PtrTy), // TypeDescriptor in getCatchableTypeType()
677 CGM.IntTy, // NonVirtualAdjustment in getCatchableTypeType()
678 CGM.IntTy, // OffsetToVBPtr in getCatchableTypeType()
679 CGM.IntTy, // VBTableIndex in getCatchableTypeType()
680 CGM.IntTy, // Size in getCatchableTypeType()
681 getImageRelativeType(CGM.Int8PtrTy) // CopyCtor in getCatchableTypeType()
684 CGM.getLLVMContext(), FieldTypes, "eh.CatchableType"); in getCatchableTypeType()
699 CGM.IntTy, // NumEntries in getCatchableTypeArrayType()
703 llvm::StructType::create(CGM.getLLVMContext(), FieldTypes, CTATypeName); in getCatchableTypeArrayType()
711 CGM.IntTy, // Flags in getThrowInfoType()
712 getImageRelativeType(CGM.Int8PtrTy), // CleanupFn in getThrowInfoType()
713 getImageRelativeType(CGM.Int8PtrTy), // ForwardCompat in getThrowInfoType()
714 getImageRelativeType(CGM.Int8PtrTy) // CatchableTypeArray in getThrowInfoType()
716 ThrowInfoType = llvm::StructType::create(CGM.getLLVMContext(), FieldTypes, in getThrowInfoType()
724 llvm::Type *Args[] = {CGM.Int8PtrTy, getThrowInfoType()->getPointerTo()}; in getThrowFn()
726 llvm::FunctionType::get(CGM.VoidTy, Args, /*IsVarArgs=*/false); in getThrowFn()
728 CGM.CreateRuntimeFunction(FTy, "_CxxThrowException")); in getThrowFn()
730 if (CGM.getTarget().getTriple().getArch() == llvm::Triple::x86) in getThrowFn()
792 switch (CGM.getTarget().getTriple().getArch()) { in getRecordArgABI()
868 llvm::ConstantPointerNull::get(CGM.Int8PtrTy), in emitRethrow()
946 CGF.CGM.getVBaseAlignment(Value.getAlignment(), SrcDecl, PolymorphicBase); in performBaseAdjustment()
963 llvm::Constant *Fn = CGF.CGM.CreateRuntimeFunction(FTy, "__RTtypeid"); in emitRTtypeidCall()
969 emitRTtypeidCall(CGF, llvm::Constant::getNullValue(CGM.VoidPtrTy)); in EmitBadTypeidCall()
997 CGF.CGM.GetAddrOfRTTIDescriptor(SrcRecordTy.getUnqualifiedType()); in EmitDynamicCastCall()
999 CGF.CGM.GetAddrOfRTTIDescriptor(DestRecordTy.getUnqualifiedType()); in EmitDynamicCastCall()
1014 llvm::Constant *Function = CGF.CGM.CreateRuntimeFunction( in EmitDynamicCastCall()
1033 llvm::Constant *Function = CGF.CGM.CreateRuntimeFunction( in EmitDynamicCastToVoid()
1050 llvm::Value *VBPtrOffset = llvm::ConstantInt::get(CGM.PtrDiffTy, VBPtrChars); in GetVirtualBaseClassOffset()
1054 CGM.getMicrosoftVTableContext().getVBTableIndex(ClassDecl, BaseClassDecl); in GetVirtualBaseClassOffset()
1056 llvm::ConstantInt::get(CGM.IntTy, VBTableChars.getQuantity()); in GetVirtualBaseClassOffset()
1061 CGF.Builder.CreateSExtOrBitCast(VBPtrToNewBase, CGM.PtrDiffTy); in GetVirtualBaseClassOffset()
1083 CharUnits Align = CGM.getContext().getTypeAlignInChars(FI.getReturnType()); in classifyReturnType()
1159 VBaseOffset, llvm::ConstantInt::get(CGM.PtrDiffTy, ConstantVBaseOffset), in initializeHiddenVirtualInheritanceMembers()
1188 CGM.EmitGlobal(GlobalDecl(D, Ctor_Complete)); in EmitCXXConstructors()
1205 This = CGF.Builder.CreateElementBitCast(This, CGM.Int8Ty, "this.int8"); in EmitVBPtrStores()
1256 CGM.EmitGlobal(GlobalDecl(D, Dtor_Base)); in EmitCXXDestructors()
1277 CGM.getMicrosoftVTableContext().getMethodVFTableLocation(LookupGD); in getVirtualFunctionPrologueThisAdjustment()
1326 CGM.getMicrosoftVTableContext().getMethodVFTableLocation(LookupGD); in adjustThisArgumentForVirtualFunctionCall()
1347 CGF.CGM.getVBaseAlignment(Result.getAlignment(), Derived, VBase); in adjustThisArgumentForVirtualFunctionCall()
1471 MostDerivedArg = llvm::ConstantInt::get(CGM.Int32Ty, Type == Ctor_Complete); in addImplicitConstructorArgs()
1487 llvm::Value *Callee = CGM.getAddrOfCXXStructor(DD, getFromDtorType(Type)); in EmitDestructorCall()
1505 if (!CGM.getCodeGenOpts().PrepareForLTO) in emitVTableTypeMetadata()
1518 CGM.AddVTableTypeMetadata(VTable, AddressPoint, RD); in emitVTableTypeMetadata()
1523 CGM.AddVTableTypeMetadata(VTable, AddressPoint, in emitVTableTypeMetadata()
1542 CGM.AddVTableTypeMetadata(VTable, AddressPoint, DerivedRD); in emitVTableTypeMetadata()
1547 CGM.AddVTableTypeMetadata(VTable, AddressPoint, RD); in emitVTableTypeMetadata()
1552 MicrosoftVTableContext &VFTContext = CGM.getMicrosoftVTableContext(); in emitVTableDefinitions()
1632 MicrosoftVTableContext &VTContext = CGM.getMicrosoftVTableContext(); in getAddrOfVTable()
1638 CGM.addDeferredVTable(RD); in getAddrOfVTable()
1675 : CGM.getVTableLinkage(RD); in getAddrOfVTable()
1683 CGM.getModule().getNamedGlobal(VFTableName)) { in getAddrOfVTable()
1701 llvm::ArrayType::get(CGM.Int8PtrTy, NumVTableSlots); in getAddrOfVTable()
1706 VTable = new llvm::GlobalVariable(CGM.getModule(), VTableType, in getAddrOfVTable()
1716 C = CGM.getModule().getOrInsertComdat(VFTableName.str()); in getAddrOfVTable()
1722 llvm::Value *GEPIndices[] = {llvm::ConstantInt::get(CGM.IntTy, 0), in getAddrOfVTable()
1723 llvm::ConstantInt::get(CGM.IntTy, 1)}; in getAddrOfVTable()
1733 VFTable = llvm::GlobalAlias::create(CGM.Int8PtrTy, in getAddrOfVTable()
1736 &CGM.getModule()); in getAddrOfVTable()
1814 CGM.getMicrosoftVTableContext().getMethodVFTableLocation(GD); in getVirtualFunctionPointer()
1819 ML.Index * CGM.getContext().getTargetInfo().getPointerWidth(0) / 8); in getVirtualFunctionPointer()
1821 if (CGM.getCodeGenOpts().PrepareForLTO) in getVirtualFunctionPointer()
1840 const CGFunctionInfo *FInfo = &CGM.getTypes().arrangeCXXStructorDeclaration( in EmitVirtualDestructorCall()
1842 llvm::Type *Ty = CGF.CGM.getTypes().GetFunctionType(*FInfo); in EmitVirtualDestructorCall()
1870 MicrosoftVTableContext &Context = CGM.getMicrosoftVTableContext(); in enumerateVBTables()
1875 llvm::GlobalVariable::LinkageTypes Linkage = CGM.getVTableLinkage(RD); in enumerateVBTables()
1897 if (llvm::GlobalValue *GV = CGM.getModule().getNamedValue(ThunkName)) in EmitVirtualMemPtrThunk()
1901 const CGFunctionInfo &FnInfo = CGM.getTypes().arrangeMSMemberPointerThunk(MD); in EmitVirtualMemPtrThunk()
1902 llvm::FunctionType *ThunkTy = CGM.getTypes().GetFunctionType(FnInfo); in EmitVirtualMemPtrThunk()
1905 ThunkName.str(), &CGM.getModule()); in EmitVirtualMemPtrThunk()
1912 ThunkFn->setComdat(CGM.getModule().getOrInsertComdat(ThunkFn->getName())); in EmitVirtualMemPtrThunk()
1914 CGM.SetLLVMFunctionAttributes(MD, FnInfo, ThunkFn); in EmitVirtualMemPtrThunk()
1915 CGM.SetLLVMFunctionAttributesForDefinition(MD, ThunkFn); in EmitVirtualMemPtrThunk()
1927 CodeGenFunction CGF(CGM); in EmitVirtualMemPtrThunk()
1975 llvm::ArrayType::get(CGM.IntTy, 1 + VBT.ReusingBase->getNumVBases()); in getAddrOfVBTable()
1977 assert(!CGM.getModule().getNamedGlobal(Name) && in getAddrOfVBTable()
1980 CGM.CreateOrReplaceCXXRuntimeVariable(Name, VBTableType, Linkage); in getAddrOfVBTable()
2011 Offsets[0] = llvm::ConstantInt::get(CGM.IntTy, -VBPtrOffset.getQuantity()); in emitVBTableDefinition()
2013 MicrosoftVTableContext &Context = CGM.getMicrosoftVTableContext(); in emitVBTableDefinition()
2028 Offsets[VBIndex] = llvm::ConstantInt::get(CGM.IntTy, Offset.getQuantity()); in emitVBTableDefinition()
2035 llvm::ArrayType::get(CGM.IntTy, Offsets.size()); in emitVBTableDefinition()
2185 CGF.CGM.CreateRuntimeFunction(TLRegDtorTy, "__tlregdtor"); in emitGlobalDtorWithTLRegDtor()
2203 CodeGenModule &CGM, ArrayRef<const VarDecl *> CXXThreadLocals, in EmitThreadLocalInitFuncs() argument
2209 auto AddToXDU = [&CGM](llvm::Function *InitFunc) { in EmitThreadLocalInitFuncs()
2211 CGM.getModule(), InitFunc->getType(), /*IsConstant=*/true, in EmitThreadLocalInitFuncs()
2217 CGM.addUsedGlobal(InitFuncPtr); in EmitThreadLocalInitFuncs()
2224 CGM.GetGlobalValue(CGM.getMangledName(CXXThreadLocalInitVars[I]))); in EmitThreadLocalInitFuncs()
2236 llvm::FunctionType::get(CGM.VoidTy, /*isVarArg=*/false); in EmitThreadLocalInitFuncs()
2237 llvm::Function *InitFunc = CGM.CreateGlobalInitOrDestructFunction( in EmitThreadLocalInitFuncs()
2238 FTy, "__tls_init", CGM.getTypes().arrangeNullaryFunction(), in EmitThreadLocalInitFuncs()
2240 CodeGenFunction(CGM).GenerateCXXGlobalInitFunc(InitFunc, NonComdatInits); in EmitThreadLocalInitFuncs()
2249 CGF.CGM.ErrorUnsupported(VD, "thread wrappers"); in EmitThreadLocalVarDeclLValue()
2253 static ConstantAddress getInitThreadEpochPtr(CodeGenModule &CGM) { in getInitThreadEpochPtr() argument
2255 CharUnits Align = CGM.getIntAlign(); in getInitThreadEpochPtr()
2256 if (auto *GV = CGM.getModule().getNamedGlobal(VarName)) in getInitThreadEpochPtr()
2259 CGM.getModule(), CGM.IntTy, in getInitThreadEpochPtr()
2267 static llvm::Constant *getInitThreadHeaderFn(CodeGenModule &CGM) { in getInitThreadHeaderFn() argument
2269 llvm::FunctionType::get(llvm::Type::getVoidTy(CGM.getLLVMContext()), in getInitThreadHeaderFn()
2270 CGM.IntTy->getPointerTo(), /*isVarArg=*/false); in getInitThreadHeaderFn()
2271 return CGM.CreateRuntimeFunction( in getInitThreadHeaderFn()
2273 llvm::AttributeSet::get(CGM.getLLVMContext(), in getInitThreadHeaderFn()
2278 static llvm::Constant *getInitThreadFooterFn(CodeGenModule &CGM) { in getInitThreadFooterFn() argument
2280 llvm::FunctionType::get(llvm::Type::getVoidTy(CGM.getLLVMContext()), in getInitThreadFooterFn()
2281 CGM.IntTy->getPointerTo(), /*isVarArg=*/false); in getInitThreadFooterFn()
2282 return CGM.CreateRuntimeFunction( in getInitThreadFooterFn()
2284 llvm::AttributeSet::get(CGM.getLLVMContext(), in getInitThreadFooterFn()
2289 static llvm::Constant *getInitThreadAbortFn(CodeGenModule &CGM) { in getInitThreadAbortFn() argument
2291 llvm::FunctionType::get(llvm::Type::getVoidTy(CGM.getLLVMContext()), in getInitThreadAbortFn()
2292 CGM.IntTy->getPointerTo(), /*isVarArg=*/false); in getInitThreadAbortFn()
2293 return CGM.CreateRuntimeFunction( in getInitThreadAbortFn()
2295 llvm::AttributeSet::get(CGM.getLLVMContext(), in getInitThreadAbortFn()
2324 CGF.EmitNounwindRuntimeCall(getInitThreadAbortFn(CGF.CGM), Guard); in Emit()
2338 F->setComdat(CGM.getModule().getOrInsertComdat(F->getName())); in EmitGuardedInit()
2399 new llvm::GlobalVariable(CGM.getModule(), GuardTy, /*isConstant=*/false, in EmitGuardedInit()
2406 CGM.getModule().getOrInsertComdat(GuardVar->getName())); in EmitGuardedInit()
2462 Builder.CreateLoad(getInitThreadEpochPtr(CGM)); in EmitGuardedInit()
2472 CGF.EmitNounwindRuntimeCall(getInitThreadHeaderFn(CGM), in EmitGuardedInit()
2486 CGF.EmitNounwindRuntimeCall(getInitThreadFooterFn(CGM), in EmitGuardedInit()
2515 fields.push_back(CGM.VoidPtrTy); // FunctionPointerOrVirtualThunk in ConvertMemberPointerType()
2517 fields.push_back(CGM.IntTy); // FieldOffset in ConvertMemberPointerType()
2521 fields.push_back(CGM.IntTy); in ConvertMemberPointerType()
2523 fields.push_back(CGM.IntTy); in ConvertMemberPointerType()
2525 fields.push_back(CGM.IntTy); // VirtualBaseAdjustmentOffset in ConvertMemberPointerType()
2529 return llvm::StructType::get(CGM.getLLVMContext(), fields); in ConvertMemberPointerType()
2540 fields.push_back(llvm::Constant::getNullValue(CGM.VoidPtrTy)); in GetNullMemberPointerFields()
2586 CGM.IntTy, NonVirtualBaseAdjustment.getQuantity())); in EmitFullMemberPointer()
2592 fields.push_back(llvm::ConstantInt::get(CGM.IntTy, Offs.getQuantity())); in EmitFullMemberPointer()
2597 fields.push_back(llvm::ConstantInt::get(CGM.IntTy, VBTableIndex)); in EmitFullMemberPointer()
2610 llvm::ConstantInt::get(CGM.IntTy, offset.getQuantity()); in EmitMemberDataPointer()
2676 CodeGenTypes &Types = CGM.getTypes(); in EmitMemberFunctionPointer()
2690 Ty = CGM.PtrDiffTy; in EmitMemberFunctionPointer()
2692 FirstField = CGM.GetAddrOfFunction(MD, Ty); in EmitMemberFunctionPointer()
2694 auto &VTableContext = CGM.getMicrosoftVTableContext(); in EmitMemberFunctionPointer()
2710 FirstField = llvm::ConstantExpr::getBitCast(FirstField, CGM.VoidPtrTy); in EmitMemberFunctionPointer()
2786 fields.push_back(llvm::Constant::getNullValue(CGM.VoidPtrTy)); in EmitMemberPointerIsNotNull()
2848 This = Builder.CreateElementBitCast(This, CGM.Int8Ty); in GetVBaseOffsetFromVBPtr()
2853 CGM.Int32Ty->getPointerTo(0)->getPointerTo(This.getAddressSpace())); in GetVBaseOffsetFromVBPtr()
2872 VBaseOffs = Builder.CreateBitCast(VBaseOffs, CGM.Int32Ty->getPointerTo(0)); in GetVBaseOffsetFromVBPtr()
2883 Base = Builder.CreateElementBitCast(Base, CGM.Int8Ty); in AdjustVirtualBase()
2908 DiagnosticsEngine &Diags = CGF.CGM.getDiags(); in AdjustVirtualBase()
2916 VBPtrOffset = llvm::ConstantInt::get(CGM.IntTy, offs.getQuantity()); in AdjustVirtualBase()
2927 llvm::PHINode *Phi = Builder.CreatePHI(CGM.Int8PtrTy, 2, "memptr.base"); in AdjustVirtualBase()
3094 llvm::ConstantInt::get(CGM.IntTy, SrcOffsetToFirstVBase), in EmitNonNullMemberPointerConversion()
3108 CGM.IntTy, in EmitNonNullMemberPointerConversion()
3109 CGM.computeNonVirtualBaseClassOffset(DerivedClass, PathBegin, PathEnd) in EmitNonNullMemberPointerConversion()
3128 VirtualBaseAdjustmentOffset, llvm::ConstantInt::get(CGM.IntTy, 4)); in EmitNonNullMemberPointerConversion()
3149 CGM.IntTy, in EmitNonNullMemberPointerConversion()
3163 llvm::ConstantInt::get(CGM.IntTy, DstOffsetToFirstVBase), in EmitNonNullMemberPointerConversion()
3218 CGBuilderTy Builder(CGM, CGM.getLLVMContext()); in EmitMemberPointerConversion()
3233 llvm::FunctionType *FTy = CGM.getTypes().GetFunctionType( in EmitLoadOfMemberFunctionPointer()
3234 CGM.getTypes().arrangeCXXMethodType(RD, FPT, /*FD=*/nullptr)); in EmitLoadOfMemberFunctionPointer()
3275 CGCXXABI *clang::CodeGen::CreateMicrosoftCXXABI(CodeGenModule &CGM) { in CreateMicrosoftCXXABI() argument
3276 return new MicrosoftCXXABI(CGM); in CreateMicrosoftCXXABI()
3309 static llvm::GlobalVariable *getTypeInfoVTable(CodeGenModule &CGM) { in getTypeInfoVTable() argument
3311 if (auto VTable = CGM.getModule().getNamedGlobal(MangledName)) in getTypeInfoVTable()
3313 return new llvm::GlobalVariable(CGM.getModule(), CGM.Int8PtrTy, in getTypeInfoVTable()
3404 : CGM(ABI.CGM), Context(CGM.getContext()), in MSRTTIBuilder()
3405 VMContext(CGM.getLLVMContext()), Module(CGM.getModule()), RD(RD), in MSRTTIBuilder()
3406 Linkage(getLinkageForRTTI(CGM.getContext().getTagDeclType(RD))), in MSRTTIBuilder()
3415 CodeGenModule &CGM; member
3487 llvm::Value *GEPIndices[] = {llvm::ConstantInt::get(CGM.IntTy, 0), in getClassHierarchyDescriptor()
3488 llvm::ConstantInt::get(CGM.IntTy, 0)}; in getClassHierarchyDescriptor()
3496 CHD->setComdat(CGM.getModule().getOrInsertComdat(CHD->getName())); in getClassHierarchyDescriptor()
3502 llvm::ConstantInt::get(CGM.IntTy, 0), // Unknown in getClassHierarchyDescriptor()
3503 llvm::ConstantInt::get(CGM.IntTy, Flags), in getClassHierarchyDescriptor()
3504 llvm::ConstantInt::get(CGM.IntTy, Classes.size()), in getClassHierarchyDescriptor()
3534 BCA->setComdat(CGM.getModule().getOrInsertComdat(BCA->getName())); in getBaseClassArray()
3553 auto &VTableContext = CGM.getMicrosoftVTableContext(); in getBaseClassDescriptor()
3576 BCD->setComdat(CGM.getModule().getOrInsertComdat(BCD->getName())); in getBaseClassDescriptor()
3582 llvm::ConstantInt::get(CGM.IntTy, Class.NumBases), in getBaseClassDescriptor()
3583 llvm::ConstantInt::get(CGM.IntTy, Class.OffsetInVBase), in getBaseClassDescriptor()
3584 llvm::ConstantInt::get(CGM.IntTy, VBPtrOffset), in getBaseClassDescriptor()
3585 llvm::ConstantInt::get(CGM.IntTy, OffsetInVBTable), in getBaseClassDescriptor()
3586 llvm::ConstantInt::get(CGM.IntTy, Class.Flags), in getBaseClassDescriptor()
3624 llvm::ConstantInt::get(CGM.IntTy, ABI.isImageRelative()), in getCompleteObjectLocator()
3625 llvm::ConstantInt::get(CGM.IntTy, OffsetToTop), in getCompleteObjectLocator()
3626 llvm::ConstantInt::get(CGM.IntTy, VFPtrOffset), in getCompleteObjectLocator()
3628 CGM.GetAddrOfRTTIDescriptor(Context.getTypeDeclType(RD))), in getCompleteObjectLocator()
3637 COL->setComdat(CGM.getModule().getOrInsertComdat(COL->getName())); in getCompleteObjectLocator()
3713 if (llvm::GlobalVariable *GV = CGM.getModule().getNamedGlobal(MangledName)) in getAddrOfRTTIDescriptor()
3714 return llvm::ConstantExpr::getBitCast(GV, CGM.Int8PtrTy); in getAddrOfRTTIDescriptor()
3725 getTypeInfoVTable(CGM), // VFPtr in getAddrOfRTTIDescriptor()
3726 llvm::ConstantPointerNull::get(CGM.Int8PtrTy), // Runtime data in getAddrOfRTTIDescriptor()
3727 llvm::ConstantDataArray::getString(CGM.getLLVMContext(), TypeInfoString)}; in getAddrOfRTTIDescriptor()
3731 CGM.getModule(), TypeDescriptorType, /*Constant=*/false, in getAddrOfRTTIDescriptor()
3736 Var->setComdat(CGM.getModule().getOrInsertComdat(Var->getName())); in getAddrOfRTTIDescriptor()
3737 return llvm::ConstantExpr::getBitCast(Var, CGM.Int8PtrTy); in getAddrOfRTTIDescriptor()
3747 static void emitCXXConstructor(CodeGenModule &CGM, in emitCXXConstructor() argument
3751 llvm::Function *Fn = CGM.codegenCXXStructor(ctor, StructorType::Complete); in emitCXXConstructor()
3752 CGM.maybeSetTrivialComdat(*ctor, *Fn); in emitCXXConstructor()
3755 static void emitCXXDestructor(CodeGenModule &CGM, const CXXDestructorDecl *dtor, in emitCXXDestructor() argument
3761 bool ProducedAlias = !CGM.TryEmitDefinitionAsAlias( in emitCXXDestructor()
3767 CGM.getVTables().EmitThunks(GlobalDecl(dtor, Dtor_Complete)); in emitCXXDestructor()
3775 if (dtorType == StructorType::Base && !CGM.TryEmitBaseDestructorAsAlias(dtor)) in emitCXXDestructor()
3778 llvm::Function *Fn = CGM.codegenCXXStructor(dtor, dtorType); in emitCXXDestructor()
3780 Fn->setComdat(CGM.getModule().getOrInsertComdat(Fn->getName())); in emitCXXDestructor()
3786 emitCXXConstructor(CGM, CD, Type); in emitCXXStructor()
3789 emitCXXDestructor(CGM, cast<CXXDestructorDecl>(MD), Type); in emitCXXStructor()
3803 if (llvm::GlobalValue *GV = CGM.getModule().getNamedValue(ThunkName)) in getAddrOfCXXCtorClosure()
3807 const CGFunctionInfo &FnInfo = CGM.getTypes().arrangeMSCtorClosure(CD, CT); in getAddrOfCXXCtorClosure()
3808 llvm::FunctionType *ThunkTy = CGM.getTypes().GetFunctionType(FnInfo); in getAddrOfCXXCtorClosure()
3812 ThunkTy, getLinkageForRTTI(RecordTy), ThunkName.str(), &CGM.getModule()); in getAddrOfCXXCtorClosure()
3816 ThunkFn->setComdat(CGM.getModule().getOrInsertComdat(ThunkFn->getName())); in getAddrOfCXXCtorClosure()
3820 CodeGenFunction CGF(CGM); in getAddrOfCXXCtorClosure()
3886 llvm::Value *CalleeFn = CGM.getAddrOfCXXStructor(CD, StructorType::Complete); in getAddrOfCXXCtorClosure()
3887 const CGFunctionInfo &CalleeInfo = CGM.getTypes().arrangeCXXConstructorCall( in getAddrOfCXXCtorClosure()
3908 RD ? CGM.getContext().getCopyConstructorForExceptionObject(RD) : nullptr; in getCatchableType()
3921 if (llvm::GlobalVariable *GV = CGM.getModule().getNamedGlobal(MangledName)) in getCatchableType()
3935 CopyCtor = CGM.getAddrOfCXXStructor(CD, StructorType::Complete); in getCatchableType()
3937 CopyCtor = llvm::ConstantExpr::getBitCast(CopyCtor, CGM.Int8PtrTy); in getCatchableType()
3939 CopyCtor = llvm::Constant::getNullValue(CGM.Int8PtrTy); in getCatchableType()
3966 llvm::ConstantInt::get(CGM.IntTy, Flags), // Flags in getCatchableType()
3968 llvm::ConstantInt::get(CGM.IntTy, NVOffset), // NonVirtualAdjustment in getCatchableType()
3969 llvm::ConstantInt::get(CGM.IntTy, VBPtrOffset), // OffsetToVBPtr in getCatchableType()
3970 llvm::ConstantInt::get(CGM.IntTy, VBIndex), // VBTableIndex in getCatchableType()
3971 llvm::ConstantInt::get(CGM.IntTy, Size), // Size in getCatchableType()
3976 CGM.getModule(), CTType, /*Constant=*/true, getLinkageForRTTI(T), in getCatchableType()
3981 GV->setComdat(CGM.getModule().getOrInsertComdat(GV->getName())); in getCatchableType()
4018 MicrosoftVTableContext &VTableContext = CGM.getMicrosoftVTableContext(); in getCatchableTypeArray()
4083 llvm::ConstantInt::get(CGM.IntTy, NumEntries), // NumEntries in getCatchableTypeArray()
4094 CGM.getModule(), CTAType, /*Constant=*/true, getLinkageForRTTI(T), in getCatchableTypeArray()
4099 CTA->setComdat(CGM.getModule().getOrInsertComdat(CTA->getName())); in getCatchableTypeArray()
4127 if (llvm::GlobalVariable *GV = CGM.getModule().getNamedGlobal(MangledName)) in getThrowInfo()
4143 llvm::Constant *CleanupFn = llvm::Constant::getNullValue(CGM.Int8PtrTy); in getThrowInfo()
4148 CGM.getAddrOfCXXStructor(DtorD, StructorType::Complete), in getThrowInfo()
4149 CGM.Int8PtrTy); in getThrowInfo()
4152 getImageRelativeConstant(llvm::Constant::getNullValue(CGM.Int8PtrTy)); in getThrowInfo()
4154 llvm::ConstantExpr::getBitCast(CTA, CGM.Int8PtrTy)); in getThrowInfo()
4157 llvm::ConstantInt::get(CGM.IntTy, Flags), // Flags in getThrowInfo()
4163 CGM.getModule(), TIType, /*Constant=*/true, getLinkageForRTTI(T), in getThrowInfo()
4168 GV->setComdat(CGM.getModule().getOrInsertComdat(GV->getName())); in getThrowInfo()
4187 CGF.Builder.CreateBitCast(AI.getPointer(), CGM.Int8PtrTy), in emitThrow()