• Home
  • Raw
  • Download

Lines Matching refs:CGM

40   MicrosoftCXXABI(CodeGenModule &CGM)  in MicrosoftCXXABI()  argument
41 : CGCXXABI(CGM), BaseClassDescriptorType(nullptr), in MicrosoftCXXABI()
157 CGM.getMicrosoftVTableContext().getMethodVFTableLocation(MD); in getThisArgumentTypeForMethod()
222 CGM.getContext().IntTy); in adjustCallArgsForDestructorThunk()
299 return CGM.getTarget().getPointerWidth(/*AddressSpace=*/0) == 64; in isImageRelative()
311 CGM.Int8PtrPtrTy, in getTypeDescriptorType()
312 CGM.Int8PtrTy, in getTypeDescriptorType()
313 llvm::ArrayType::get(CGM.Int8Ty, TypeInfoString.size() + 1)}; in getTypeDescriptorType()
315 llvm::StructType::create(CGM.getLLVMContext(), FieldTypes, TDTypeName); in getTypeDescriptorType()
322 return CGM.IntTy; in getImageRelativeType()
329 getImageRelativeType(CGM.Int8PtrTy), in getBaseClassDescriptorType()
330 CGM.IntTy, in getBaseClassDescriptorType()
331 CGM.IntTy, in getBaseClassDescriptorType()
332 CGM.IntTy, in getBaseClassDescriptorType()
333 CGM.IntTy, in getBaseClassDescriptorType()
334 CGM.IntTy, in getBaseClassDescriptorType()
338 CGM.getLLVMContext(), FieldTypes, "rtti.BaseClassDescriptor"); in getBaseClassDescriptorType()
347 CGM.getLLVMContext(), "rtti.ClassHierarchyDescriptor"); in getClassHierarchyDescriptorType()
349 CGM.IntTy, in getClassHierarchyDescriptorType()
350 CGM.IntTy, in getClassHierarchyDescriptorType()
351 CGM.IntTy, in getClassHierarchyDescriptorType()
363 CGM.getLLVMContext(), "rtti.CompleteObjectLocator"); in getCompleteObjectLocatorType()
365 CGM.IntTy, in getCompleteObjectLocatorType()
366 CGM.IntTy, in getCompleteObjectLocatorType()
367 CGM.IntTy, in getCompleteObjectLocatorType()
368 getImageRelativeType(CGM.Int8PtrTy), in getCompleteObjectLocatorType()
381 if (llvm::GlobalVariable *GV = CGM.getModule().getNamedGlobal(Name)) in getImageBase()
384 return new llvm::GlobalVariable(CGM.getModule(), CGM.Int8Ty, in getImageBase()
395 llvm::ConstantExpr::getPtrToInt(getImageBase(), CGM.IntPtrTy); in getImageRelativeConstant()
397 llvm::ConstantExpr::getPtrToInt(PtrVal, CGM.IntPtrTy); in getImageRelativeConstant()
401 return llvm::ConstantExpr::getTrunc(Diff, CGM.IntTy); in getImageRelativeConstant()
410 return llvm::ConstantInt::get(CGM.IntTy, 0); in getZeroInt()
414 return llvm::Constant::getAllOnesValue(CGM.IntTy); in getAllOnesInt()
445 llvm::Value *VBPOffset = llvm::ConstantInt::get(CGM.IntTy, VBPtrOffset), in GetVBaseOffsetFromVBPtr()
446 *VBTOffset = llvm::ConstantInt::get(CGM.IntTy, VBTableOffset); in GetVBaseOffsetFromVBPtr()
558 switch (CGM.getTarget().getTriple().getArch()) { in getRecordArgABI()
626 return CGF.CGM.getCXXABI().GetVirtualBaseClassOffset( in getPolymorphicOffset()
651 !CGM.getContext().getASTRecordLayout(SrcDecl).hasExtendableVFPtr(); in shouldTypeidBeNullChecked()
660 llvm::Constant *Fn = CGF.CGM.CreateRuntimeFunction(FTy, "__RTtypeid"); in emitRTtypeidCall()
666 emitRTtypeidCall(CGF, llvm::Constant::getNullValue(CGM.VoidPtrTy)); in EmitBadTypeidCall()
685 !CGM.getContext().getASTRecordLayout(SrcDecl).hasExtendableVFPtr(); in shouldDynamicCastCallBeNullChecked()
694 CGF.CGM.GetAddrOfRTTIDescriptor(SrcRecordTy.getUnqualifiedType()); in EmitDynamicCastCall()
696 CGF.CGM.GetAddrOfRTTIDescriptor(DestRecordTy.getUnqualifiedType()); in EmitDynamicCastCall()
709 llvm::Constant *Function = CGF.CGM.CreateRuntimeFunction( in EmitDynamicCastCall()
729 llvm::Constant *Function = CGF.CGM.CreateRuntimeFunction( in EmitDynamicCastToVoid()
747 llvm::Value *VBPtrOffset = llvm::ConstantInt::get(CGM.PtrDiffTy, VBPtrChars); in GetVirtualBaseClassOffset()
751 CGM.getMicrosoftVTableContext().getVBTableIndex(ClassDecl, BaseClassDecl); in GetVirtualBaseClassOffset()
753 llvm::ConstantInt::get(CGM.IntTy, VBTableChars.getQuantity()); in GetVirtualBaseClassOffset()
758 CGF.Builder.CreateSExtOrBitCast(VBPtrToNewBase, CGM.PtrDiffTy); in GetVirtualBaseClassOffset()
798 ArgTys.insert(ArgTys.begin() + 1, CGM.getContext().IntTy); in BuildConstructorSignature()
800 ArgTys.push_back(CGM.getContext().IntTy); in BuildConstructorSignature()
867 VBaseOffset, llvm::ConstantInt::get(CGM.Int32Ty, ConstantVBaseOffset), in initializeHiddenVirtualInheritanceMembers()
885 CGM.EmitGlobal(GlobalDecl(D, Ctor_Complete)); in EmitCXXConstructors()
891 CGF.Builder.CreateBitCast(getThisValue(CGF), CGM.Int8PtrTy, "this.int8"); in EmitVBPtrStores()
892 const ASTRecordLayout &Layout = CGM.getContext().getASTRecordLayout(RD); in EmitVBPtrStores()
899 CGM.getContext().getASTRecordLayout(VBT->BaseWithVPtr); in EmitVBPtrStores()
922 ArgTys.push_back(CGM.getContext().IntTy); in BuildDestructorSignature()
929 CGM.EmitGlobal(GlobalDecl(D, Dtor_Base)); in EmitCXXDestructors()
950 CGM.getMicrosoftVTableContext().getMethodVFTableLocation(LookupGD); in getVirtualFunctionPrologueThisAdjustment()
962 CGM.getContext().getASTRecordLayout(MD->getParent()); in getVirtualFunctionPrologueThisAdjustment()
1000 CGM.getMicrosoftVTableContext().getMethodVFTableLocation(LookupGD); in adjustThisArgumentForVirtualFunctionCall()
1142 llvm::ConstantInt::get(CGM.Int32Ty, Type == Ctor_Complete); in addImplicitConstructorArgs()
1159 llvm::Value *Callee = CGM.GetAddrOfCXXDestructor(DD, Type); in EmitDestructorCall()
1176 MicrosoftVTableContext &VFTContext = CGM.getMicrosoftVTableContext(); in emitVTableDefinitions()
1207 !CGM.getContext().getASTRecordLayout(Base.getBase()).hasOwnVFPtr()); in getVTableAddressPointInStructor()
1242 MicrosoftVTableContext &VTContext = CGM.getMicrosoftVTableContext(); in getAddrOfVTable()
1248 CGM.addDeferredVTable(RD); in getAddrOfVTable()
1276 llvm::ArrayType::get(CGM.Int8PtrTy, NumVTableSlots); in getAddrOfVTable()
1282 VTable = CGM.getModule().getNamedGlobal(VFTableName); in getAddrOfVTable()
1287 CGM.getModule(), VTableType, /*isConstant=*/true, VTableLinkage, in getAddrOfVTable()
1296 llvm::Value *GEPIndices[] = {llvm::ConstantInt::get(CGM.IntTy, 0), in getAddrOfVTable()
1297 llvm::ConstantInt::get(CGM.IntTy, 1)}; in getAddrOfVTable()
1309 VFTableName.str(), VTableGEP, &CGM.getModule()); in getAddrOfVTable()
1323 llvm::GlobalValue::LinkageTypes VFTableLinkage = CGM.getVTableLinkage(RD); in getAddrOfVTable()
1338 CGM.getModule().getOrInsertComdat(VFTable->getName()); in getAddrOfVTable()
1351 CGM.setGlobalVisibility(VFTable, RD); in getAddrOfVTable()
1373 CGM.getMicrosoftVTableContext().getMethodVFTableLocation(GD); in getVirtualFunctionPointer()
1390 &CGM.getTypes().arrangeCXXDestructor(Dtor, Dtor_Deleting); in EmitVirtualDestructorCall()
1391 llvm::Type *Ty = CGF.CGM.getTypes().GetFunctionType(*FInfo); in EmitVirtualDestructorCall()
1416 MicrosoftVTableContext &Context = CGM.getMicrosoftVTableContext(); in enumerateVBTables()
1421 llvm::GlobalVariable::LinkageTypes Linkage = CGM.getVTableLinkage(RD); in enumerateVBTables()
1441 if (llvm::GlobalValue *GV = CGM.getModule().getNamedValue(ThunkName)) in EmitVirtualMemPtrThunk()
1445 const CGFunctionInfo &FnInfo = CGM.getTypes().arrangeGlobalDeclaration(MD); in EmitVirtualMemPtrThunk()
1446 llvm::FunctionType *ThunkTy = CGM.getTypes().GetFunctionType(FnInfo); in EmitVirtualMemPtrThunk()
1449 ThunkName.str(), &CGM.getModule()); in EmitVirtualMemPtrThunk()
1456 CGM.SetLLVMFunctionAttributes(MD, FnInfo, ThunkFn); in EmitVirtualMemPtrThunk()
1457 CGM.SetLLVMFunctionAttributesForDefinition(MD, ThunkFn); in EmitVirtualMemPtrThunk()
1460 CodeGenFunction CGF(CGM); in EmitVirtualMemPtrThunk()
1474 CGM.ConstructAttributeList(FnInfo, MD, AttributeList, CallingConv, true); in EmitVirtualMemPtrThunk()
1520 llvm::ArrayType::get(CGM.IntTy, 1 + VBT.ReusingBase->getNumVBases()); in getAddrOfVBTable()
1522 assert(!CGM.getModule().getNamedGlobal(Name) && in getAddrOfVBTable()
1525 CGM.CreateOrReplaceCXXRuntimeVariable(Name, VBTableType, Linkage); in getAddrOfVBTable()
1545 CGM.getContext().getASTRecordLayout(VBT.BaseWithVPtr); in emitVBTableDefinition()
1547 CGM.getContext().getASTRecordLayout(RD); in emitVBTableDefinition()
1554 Offsets[0] = llvm::ConstantInt::get(CGM.IntTy, -VBPtrOffset.getQuantity()); in emitVBTableDefinition()
1556 MicrosoftVTableContext &Context = CGM.getMicrosoftVTableContext(); in emitVBTableDefinition()
1571 Offsets[VBIndex] = llvm::ConstantInt::get(CGM.IntTy, Offset.getQuantity()); in emitVBTableDefinition()
1578 llvm::ArrayType::get(CGM.IntTy, Offsets.size()); in emitVBTableDefinition()
1583 CGM.setGlobalVisibility(GV, RD); in emitVBTableDefinition()
1728 CGM.ErrorUnsupported(&D, "dynamic TLS initialization"); in EmitGuardedInit()
1769 new llvm::GlobalVariable(CGM.getModule(), GuardTy, false, in EmitGuardedInit()
1825 fields.push_back(CGM.VoidPtrTy); // FunctionPointerOrVirtualThunk in ConvertMemberPointerType()
1827 fields.push_back(CGM.IntTy); // FieldOffset in ConvertMemberPointerType()
1831 fields.push_back(CGM.IntTy); in ConvertMemberPointerType()
1833 fields.push_back(CGM.IntTy); in ConvertMemberPointerType()
1835 fields.push_back(CGM.IntTy); // VirtualBaseAdjustmentOffset in ConvertMemberPointerType()
1839 return llvm::StructType::get(CGM.getLLVMContext(), fields); in ConvertMemberPointerType()
1850 fields.push_back(llvm::Constant::getNullValue(CGM.VoidPtrTy)); in GetNullMemberPointerFields()
1896 CGM.IntTy, NonVirtualBaseAdjustment.getQuantity())); in EmitFullMemberPointer()
1902 fields.push_back(llvm::ConstantInt::get(CGM.IntTy, Offs.getQuantity())); in EmitFullMemberPointer()
1917 llvm::ConstantInt::get(CGM.IntTy, offset.getQuantity()); in EmitMemberDataPointer()
1953 CodeGenTypes &Types = CGM.getTypes(); in BuildMemberPointer()
1966 Ty = CGM.PtrDiffTy; in BuildMemberPointer()
1968 FirstField = CGM.GetAddrOfFunction(MD, Ty); in BuildMemberPointer()
1969 FirstField = llvm::ConstantExpr::getBitCast(FirstField, CGM.VoidPtrTy); in BuildMemberPointer()
1972 CGM.getMicrosoftVTableContext().getMethodVFTableLocation(MD); in BuildMemberPointer()
1974 CGM.ErrorUnsupported(MD, "pointer to variadic virtual member function"); in BuildMemberPointer()
1975 FirstField = llvm::Constant::getNullValue(CGM.VoidPtrTy); in BuildMemberPointer()
1976 } else if (!CGM.getTypes().isFuncTypeConvertible( in BuildMemberPointer()
1978 CGM.ErrorUnsupported(MD, "pointer to virtual member function with " in BuildMemberPointer()
1980 FirstField = llvm::Constant::getNullValue(CGM.VoidPtrTy); in BuildMemberPointer()
1982 CGM.ErrorUnsupported(MD, "pointer to virtual member function overriding " in BuildMemberPointer()
1984 FirstField = llvm::Constant::getNullValue(CGM.VoidPtrTy); in BuildMemberPointer()
1987 FirstField = llvm::ConstantExpr::getBitCast(Thunk, CGM.VoidPtrTy); in BuildMemberPointer()
2069 fields.push_back(llvm::Constant::getNullValue(CGM.VoidPtrTy)); in EmitMemberPointerIsNotNull()
2131 This = Builder.CreateBitCast(This, CGM.Int8PtrTy); in GetVBaseOffsetFromVBPtr()
2135 VBPtr = Builder.CreateBitCast(VBPtr, CGM.Int8PtrTy->getPointerTo(0)); in GetVBaseOffsetFromVBPtr()
2140 VBaseOffs = Builder.CreateBitCast(VBaseOffs, CGM.Int32Ty->getPointerTo(0)); in GetVBaseOffsetFromVBPtr()
2150 Base = Builder.CreateBitCast(Base, CGM.Int8PtrTy); in AdjustVirtualBase()
2175 DiagnosticsEngine &Diags = CGF.CGM.getDiags(); in AdjustVirtualBase()
2183 VBPtrOffset = llvm::ConstantInt::get(CGM.IntTy, offs.getQuantity()); in AdjustVirtualBase()
2194 llvm::PHINode *Phi = Builder.CreatePHI(CGM.Int8PtrTy, 2, "memptr.base"); in AdjustVirtualBase()
2323 Adj = llvm::ConstantExpr::getTruncOrBitCast(Adj, CGM.IntTy); in EmitMemberPointerConversion()
2408 Adj = llvm::ConstantExpr::getTruncOrBitCast(Adj, CGM.IntTy); in EmitMemberPointerConversion()
2445 CGM.getTypes().GetFunctionType( in EmitLoadOfMemberFunctionPointer()
2446 CGM.getTypes().arrangeCXXMethodType(RD, FPT)); in EmitLoadOfMemberFunctionPointer()
2484 CGCXXABI *clang::CodeGen::CreateMicrosoftCXXABI(CodeGenModule &CGM) { in CreateMicrosoftCXXABI() argument
2485 return new MicrosoftCXXABI(CGM); in CreateMicrosoftCXXABI()
2518 static llvm::GlobalVariable *getTypeInfoVTable(CodeGenModule &CGM) { in getTypeInfoVTable() argument
2520 if (auto VTable = CGM.getModule().getNamedGlobal(MangledName)) in getTypeInfoVTable()
2522 return new llvm::GlobalVariable(CGM.getModule(), CGM.Int8PtrTy, in getTypeInfoVTable()
2613 : CGM(ABI.CGM), Context(CGM.getContext()), in MSRTTIBuilder()
2614 VMContext(CGM.getLLVMContext()), Module(CGM.getModule()), RD(RD), in MSRTTIBuilder()
2615 Linkage(getLinkageForRTTI(CGM.getContext().getTagDeclType(RD))), in MSRTTIBuilder()
2624 CodeGenModule &CGM; member
2696 llvm::Value *GEPIndices[] = {llvm::ConstantInt::get(CGM.IntTy, 0), in getClassHierarchyDescriptor()
2697 llvm::ConstantInt::get(CGM.IntTy, 0)}; in getClassHierarchyDescriptor()
2707 llvm::ConstantInt::get(CGM.IntTy, 0), // Unknown in getClassHierarchyDescriptor()
2708 llvm::ConstantInt::get(CGM.IntTy, Flags), in getClassHierarchyDescriptor()
2709 llvm::ConstantInt::get(CGM.IntTy, Classes.size()), in getClassHierarchyDescriptor()
2755 auto &VTableContext = CGM.getMicrosoftVTableContext(); in getBaseClassDescriptor()
2782 llvm::ConstantInt::get(CGM.IntTy, Class.NumBases), in getBaseClassDescriptor()
2783 llvm::ConstantInt::get(CGM.IntTy, Class.OffsetInVBase), in getBaseClassDescriptor()
2784 llvm::ConstantInt::get(CGM.IntTy, VBPtrOffset), in getBaseClassDescriptor()
2785 llvm::ConstantInt::get(CGM.IntTy, OffsetInVBTable), in getBaseClassDescriptor()
2786 llvm::ConstantInt::get(CGM.IntTy, Class.Flags), in getBaseClassDescriptor()
2824 llvm::ConstantInt::get(CGM.IntTy, ABI.isImageRelative()), in getCompleteObjectLocator()
2825 llvm::ConstantInt::get(CGM.IntTy, OffsetToTop), in getCompleteObjectLocator()
2826 llvm::ConstantInt::get(CGM.IntTy, VFPtrOffset), in getCompleteObjectLocator()
2828 CGM.GetAddrOfRTTIDescriptor(Context.getTypeDeclType(RD))), in getCompleteObjectLocator()
2851 if (llvm::GlobalVariable *GV = CGM.getModule().getNamedGlobal(MangledName)) in getAddrOfRTTIDescriptor()
2852 return llvm::ConstantExpr::getBitCast(GV, CGM.Int8PtrTy); in getAddrOfRTTIDescriptor()
2862 getTypeInfoVTable(CGM), // VFPtr in getAddrOfRTTIDescriptor()
2863 llvm::ConstantPointerNull::get(CGM.Int8PtrTy), // Runtime data in getAddrOfRTTIDescriptor()
2864 llvm::ConstantDataArray::getString(CGM.getLLVMContext(), TypeInfoString)}; in getAddrOfRTTIDescriptor()
2869 CGM.getModule(), TypeDescriptorType, /*Constant=*/false, in getAddrOfRTTIDescriptor()
2873 CGM.Int8PtrTy); in getAddrOfRTTIDescriptor()