Skip to content

Commit

Permalink
[clang] Replace use of Type::getPointerTo() (NFC)
Browse files Browse the repository at this point in the history
Partial progress towards replacing in-tree uses of `Type::getPointerTo()`.
This needs to be done before deprecating the API.

Reviewed By: nikic, barannikov88

Differential Revision: https://reviews.llvm.org/D152321
  • Loading branch information
JOE1994 authored and s-barannikov committed Jun 16, 2023
1 parent 27f3263 commit 0f4d48d
Show file tree
Hide file tree
Showing 16 changed files with 149 additions and 264 deletions.
6 changes: 3 additions & 3 deletions clang/lib/CodeGen/CGAtomic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ namespace {
CGF.Int8Ty, VoidPtrAddr, OffsetInChars.getQuantity());
llvm::Type *IntTy = CGF.Builder.getIntNTy(AtomicSizeInBits);
auto Addr = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast(
VoidPtrAddr, IntTy->getPointerTo(), "atomic_bitfield_base");
VoidPtrAddr, llvm::PointerType::getUnqual(CGF.getLLVMContext()),
"atomic_bitfield_base");
BFI = OrigBFI;
BFI.Offset = Offset;
BFI.StorageSize = AtomicSizeInBits;
Expand Down Expand Up @@ -796,8 +797,7 @@ AddDirectArgument(CodeGenFunction &CGF, CallArgList &Args,
ValTy =
CGF.getContext().getIntTypeForBitwidth(SizeInBits, /*Signed=*/false);
llvm::Type *ITy = llvm::IntegerType::get(CGF.getLLVMContext(), SizeInBits);
Address Ptr = Address(CGF.Builder.CreateBitCast(Val, ITy->getPointerTo()),
ITy, Align);
Address Ptr = Address(Val, ITy, Align);
Val = CGF.EmitLoadOfScalar(Ptr, false,
CGF.getContext().getPointerType(ValTy),
Loc);
Expand Down
3 changes: 2 additions & 1 deletion clang/lib/CodeGen/CGBlocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,8 @@ void CodeGenFunction::setBlockContextParameter(const ImplicitParamDecl *D,
// directly as BlockPointer.
BlockPointer = Builder.CreatePointerCast(
arg,
BlockInfo->StructureType->getPointerTo(
llvm::PointerType::get(
getLLVMContext(),
getContext().getLangOpts().OpenCL
? getContext().getTargetAddressSpace(LangAS::opencl_generic)
: 0),
Expand Down
5 changes: 2 additions & 3 deletions clang/lib/CodeGen/CGBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,8 @@ class CGBuilderTy : public CGBuilderBaseTy {
/// preserving information like the alignment and address space.
Address CreateElementBitCast(Address Addr, llvm::Type *Ty,
const llvm::Twine &Name = "") {
auto *PtrTy = Ty->getPointerTo(Addr.getAddressSpace());
return Address(CreateBitCast(Addr.getPointer(), PtrTy, Name), Ty,
Addr.getAlignment(), Addr.isKnownNonNull());
return Address(Addr.getPointer(), Ty, Addr.getAlignment(),
Addr.isKnownNonNull());
}

using CGBuilderBaseTy::CreatePointerBitCastOrAddrSpaceCast;
Expand Down
130 changes: 46 additions & 84 deletions clang/lib/CodeGen/CGBuiltin.cpp

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions clang/lib/CodeGen/CGCUDANV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ CGNVCUDARuntime::CGNVCUDARuntime(CodeGenModule &CGM)

CharPtrTy = llvm::PointerType::getUnqual(Types.ConvertType(Ctx.CharTy));
VoidPtrTy = cast<llvm::PointerType>(Types.ConvertType(Ctx.VoidPtrTy));
VoidPtrPtrTy = VoidPtrTy->getPointerTo();
VoidPtrPtrTy = llvm::PointerType::getUnqual(CGM.getLLVMContext());
}

llvm::FunctionCallee CGNVCUDARuntime::getSetupArgumentFn() const {
Expand Down Expand Up @@ -268,10 +268,8 @@ llvm::FunctionType *CGNVCUDARuntime::getCallbackFnTy() const {
}

llvm::FunctionType *CGNVCUDARuntime::getRegisterLinkedBinaryFnTy() const {
auto *CallbackFnTy = getCallbackFnTy();
auto *RegisterGlobalsFnTy = getRegisterGlobalsFnTy();
llvm::Type *Params[] = {RegisterGlobalsFnTy->getPointerTo(), VoidPtrTy,
VoidPtrTy, CallbackFnTy->getPointerTo()};
llvm::Type *Params[] = {llvm::PointerType::getUnqual(Context), VoidPtrTy,
VoidPtrTy, llvm::PointerType::getUnqual(Context)};
return llvm::FunctionType::get(VoidTy, Params, false);
}

Expand Down Expand Up @@ -537,8 +535,11 @@ llvm::Function *CGNVCUDARuntime::makeRegisterGlobalsFn() {
// void __cudaRegisterFunction(void **, const char *, char *, const char *,
// int, uint3*, uint3*, dim3*, dim3*, int*)
llvm::Type *RegisterFuncParams[] = {
VoidPtrPtrTy, CharPtrTy, CharPtrTy, CharPtrTy, IntTy,
VoidPtrTy, VoidPtrTy, VoidPtrTy, VoidPtrTy, IntTy->getPointerTo()};
VoidPtrPtrTy, CharPtrTy,
CharPtrTy, CharPtrTy,
IntTy, VoidPtrTy,
VoidPtrTy, VoidPtrTy,
VoidPtrTy, llvm::PointerType::getUnqual(Context)};
llvm::FunctionCallee RegisterFunc = CGM.CreateRuntimeFunction(
llvm::FunctionType::get(IntTy, RegisterFuncParams, false),
addUnderscoredPrefixToName("RegisterFunction"));
Expand All @@ -561,7 +562,7 @@ llvm::Function *CGNVCUDARuntime::makeRegisterGlobalsFn() {
NullPtr,
NullPtr,
NullPtr,
llvm::ConstantPointerNull::get(IntTy->getPointerTo())};
llvm::ConstantPointerNull::get(llvm::PointerType::getUnqual(Context))};
Builder.CreateCall(RegisterFunc, Args);
}

Expand Down
19 changes: 6 additions & 13 deletions clang/lib/CodeGen/CGCXX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,10 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D) {
if (Replacements.count(MangledName))
return false;

// Derive the type for the alias.
llvm::Type *AliasValueType = getTypes().GetFunctionType(AliasDecl);
llvm::PointerType *AliasType = AliasValueType->getPointerTo();

// Find the referent. Some aliases might require a bitcast, in
// which case the caller is responsible for ensuring the soundness
// of these semantics.
auto *Ref = cast<llvm::GlobalValue>(GetAddrOfGlobal(TargetDecl));
llvm::Constant *Aliasee = Ref;
if (Ref->getType() != AliasType)
Aliasee = llvm::ConstantExpr::getBitCast(Ref, AliasType);
// Find the referent.
auto *Aliasee = cast<llvm::GlobalValue>(GetAddrOfGlobal(TargetDecl));

// Instead of creating as alias to a linkonce_odr, replace all of the uses
// of the aliasee.
Expand Down Expand Up @@ -170,7 +163,7 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D) {
// If we don't have a definition for the destructor yet or the definition is
// avaialable_externally, don't emit an alias. We can't emit aliases to
// declarations; that's just not how aliases work.
if (Ref->isDeclarationForLinker())
if (Aliasee->isDeclarationForLinker())
return true;

// Don't create an alias to a linker weak symbol. This avoids producing
Expand All @@ -189,7 +182,8 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D) {

// Switch any previous uses to the alias.
if (Entry) {
assert(Entry->getType() == AliasType &&
assert(Entry->getValueType() == AliasValueType &&
Entry->getAddressSpace() == Alias->getAddressSpace() &&
"declaration exists with different type");
Alias->takeName(Entry);
Entry->replaceAllUsesWith(Alias);
Expand Down Expand Up @@ -252,8 +246,7 @@ static CGCallee BuildAppleKextVirtualCall(CodeGenFunction &CGF,
"No kext in Microsoft ABI");
CodeGenModule &CGM = CGF.CGM;
llvm::Value *VTable = CGM.getCXXABI().getAddrOfVTable(RD, CharUnits());
Ty = Ty->getPointerTo();
VTable = CGF.Builder.CreateBitCast(VTable, Ty->getPointerTo());
Ty = llvm::PointerType::getUnqual(CGM.getLLVMContext());
assert(VTable && "BuildVirtualCall = kext vtbl pointer is null");
uint64_t VTableIndex = CGM.getItaniumVTableContext().getMethodVTableIndex(GD);
const VTableLayout &VTLayout = CGM.getItaniumVTableContext().getVTableLayout(RD);
Expand Down
11 changes: 4 additions & 7 deletions clang/lib/CodeGen/CGCXXABI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,8 @@ CGCallee CGCXXABI::EmitLoadOfMemberFunctionPointer(

ThisPtrForCall = This.getPointer();
const auto *FPT = MPT->getPointeeType()->castAs<FunctionProtoType>();
const auto *RD =
cast<CXXRecordDecl>(MPT->getClass()->castAs<RecordType>()->getDecl());
llvm::FunctionType *FTy = CGM.getTypes().GetFunctionType(
CGM.getTypes().arrangeCXXMethodType(RD, FPT, /*FD=*/nullptr));
llvm::Constant *FnPtr = llvm::Constant::getNullValue(FTy->getPointerTo());
llvm::Constant *FnPtr = llvm::Constant::getNullValue(
llvm::PointerType::getUnqual(CGM.getLLVMContext()));
return CGCallee::forDirect(FnPtr, FPT);
}

Expand All @@ -59,8 +56,8 @@ CGCXXABI::EmitMemberDataPointerAddress(CodeGenFunction &CGF, const Expr *E,
Address Base, llvm::Value *MemPtr,
const MemberPointerType *MPT) {
ErrorUnsupportedABI(CGF, "loads of member pointers");
llvm::Type *Ty = CGF.ConvertType(MPT->getPointeeType())
->getPointerTo(Base.getAddressSpace());
llvm::Type *Ty =
llvm::PointerType::get(CGF.getLLVMContext(), Base.getAddressSpace());
return llvm::Constant::getNullValue(Ty);
}

Expand Down
24 changes: 9 additions & 15 deletions clang/lib/CodeGen/CGClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,6 @@ ApplyNonVirtualAndVirtualOffset(CodeGenFunction &CGF, Address addr,

// Apply the base offset.
llvm::Value *ptr = addr.getPointer();
unsigned AddrSpace = ptr->getType()->getPointerAddressSpace();
ptr = CGF.Builder.CreateBitCast(ptr, CGF.Int8Ty->getPointerTo(AddrSpace));
ptr = CGF.Builder.CreateInBoundsGEP(CGF.Int8Ty, ptr, baseOffset, "add.ptr");

// If we have a virtual component, the alignment of the result will
Expand Down Expand Up @@ -329,8 +327,8 @@ Address CodeGenFunction::GetAddressOfBaseClass(

// Get the base pointer type.
llvm::Type *BaseValueTy = ConvertType((PathEnd[-1])->getType());
llvm::Type *BasePtrTy =
BaseValueTy->getPointerTo(Value.getType()->getPointerAddressSpace());
llvm::Type *PtrTy = llvm::PointerType::get(
CGM.getLLVMContext(), Value.getType()->getPointerAddressSpace());

QualType DerivedTy = getContext().getRecordType(Derived);
CharUnits DerivedAlign = CGM.getClassPointerAlignment(Derived);
Expand Down Expand Up @@ -389,9 +387,9 @@ Address CodeGenFunction::GetAddressOfBaseClass(
Builder.CreateBr(endBB);
EmitBlock(endBB);

llvm::PHINode *PHI = Builder.CreatePHI(BasePtrTy, 2, "cast.result");
llvm::PHINode *PHI = Builder.CreatePHI(PtrTy, 2, "cast.result");
PHI->addIncoming(Value.getPointer(), notNullBB);
PHI->addIncoming(llvm::Constant::getNullValue(BasePtrTy), origBB);
PHI->addIncoming(llvm::Constant::getNullValue(PtrTy), origBB);
Value = Value.withPointer(PHI, NotKnownNonNull);
}

Expand All @@ -410,7 +408,8 @@ CodeGenFunction::GetAddressOfDerivedClass(Address BaseAddr,
getContext().getCanonicalType(getContext().getTagDeclType(Derived));
unsigned AddrSpace = BaseAddr.getAddressSpace();
llvm::Type *DerivedValueTy = ConvertType(DerivedTy);
llvm::Type *DerivedPtrTy = DerivedValueTy->getPointerTo(AddrSpace);
llvm::Type *DerivedPtrTy =
llvm::PointerType::get(getLLVMContext(), AddrSpace);

llvm::Value *NonVirtualOffset =
CGM.GetNonVirtualBaseClassOffset(Derived, PathBegin, PathEnd);
Expand Down Expand Up @@ -2579,18 +2578,13 @@ void CodeGenFunction::InitializeVTablePointer(const VPtr &Vptr) {
// Finally, store the address point. Use the same LLVM types as the field to
// support optimization.
unsigned GlobalsAS = CGM.getDataLayout().getDefaultGlobalsAddressSpace();
unsigned ProgAS = CGM.getDataLayout().getProgramAddressSpace();
llvm::Type *VTablePtrTy =
llvm::FunctionType::get(CGM.Int32Ty, /*isVarArg=*/true)
->getPointerTo(ProgAS)
->getPointerTo(GlobalsAS);
llvm::Type *PtrTy = llvm::PointerType::get(CGM.getLLVMContext(), GlobalsAS);
// vtable field is derived from `this` pointer, therefore they should be in
// the same addr space. Note that this might not be LLVM address space 0.
VTableField = Builder.CreateElementBitCast(VTableField, VTablePtrTy);
VTableAddressPoint = Builder.CreateBitCast(VTableAddressPoint, VTablePtrTy);
VTableField = Builder.CreateElementBitCast(VTableField, PtrTy);

llvm::StoreInst *Store = Builder.CreateStore(VTableAddressPoint, VTableField);
TBAAAccessInfo TBAAInfo = CGM.getTBAAVTablePtrAccessInfo(VTablePtrTy);
TBAAAccessInfo TBAAInfo = CGM.getTBAAVTablePtrAccessInfo(PtrTy);
CGM.DecorateInstructionWithTBAA(Store, TBAAInfo);
if (CGM.getCodeGenOpts().OptimizationLevel > 0 &&
CGM.getCodeGenOpts().StrictVTablePointers)
Expand Down
5 changes: 3 additions & 2 deletions clang/lib/CodeGen/CGDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ llvm::Constant *CodeGenModule::getOrCreateStaticVarDecl(
if (AS != ExpectedAS) {
Addr = getTargetCodeGenInfo().performAddrSpaceCast(
*this, GV, AS, ExpectedAS,
LTy->getPointerTo(getContext().getTargetAddressSpace(ExpectedAS)));
llvm::PointerType::get(getLLVMContext(),
getContext().getTargetAddressSpace(ExpectedAS)));
}

setStaticLocalDeclAddress(&D, Addr);
Expand Down Expand Up @@ -2510,7 +2511,7 @@ void CodeGenFunction::EmitParmDecl(const VarDecl &D, ParamValue Arg,
assert(getContext().getTargetAddressSpace(SrcLangAS) ==
CGM.getDataLayout().getAllocaAddrSpace());
auto DestAS = getContext().getTargetAddressSpace(DestLangAS);
auto *T = DeclPtr.getElementType()->getPointerTo(DestAS);
auto *T = llvm::PointerType::get(getLLVMContext(), DestAS);
DeclPtr =
DeclPtr.withPointer(getTargetHooks().performAddrSpaceCast(
*this, V, SrcLangAS, DestLangAS, T, true),
Expand Down
7 changes: 3 additions & 4 deletions clang/lib/CodeGen/CGDeclCXX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ static void EmitDeclDestroy(CodeGenFunction &CGF, const VarDecl &D,
if (CGF.getContext().getLangOpts().OpenCL) {
auto DestAS =
CGM.getTargetCodeGenInfo().getAddrSpaceOfCxaAtexitPtrParam();
auto DestTy = CGF.getTypes().ConvertType(Type)->getPointerTo(
CGM.getContext().getTargetAddressSpace(DestAS));
auto DestTy = llvm::PointerType::get(
CGM.getLLVMContext(), CGM.getContext().getTargetAddressSpace(DestAS));
auto SrcAS = D.getType().getQualifiers().getAddressSpace();
if (DestAS == SrcAS)
Argument = llvm::ConstantExpr::getBitCast(Addr.getPointer(), DestTy);
Expand All @@ -132,8 +132,7 @@ static void EmitDeclDestroy(CodeGenFunction &CGF, const VarDecl &D,
// of the global destructor function should be adjusted accordingly.
Argument = llvm::ConstantPointerNull::get(DestTy);
} else {
Argument = llvm::ConstantExpr::getBitCast(
Addr.getPointer(), CGF.getTypes().ConvertType(Type)->getPointerTo());
Argument = Addr.getPointer();
}
// Otherwise, the standard logic requires a helper function.
} else {
Expand Down
6 changes: 2 additions & 4 deletions clang/lib/CodeGen/CGException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2101,7 +2101,6 @@ void CodeGenFunction::EmitSEHExceptionCodeSave(CodeGenFunction &ParentCGF,
// pointer is stored in the second field. So, GEP 20 bytes backwards and
// load the pointer.
SEHInfo = Builder.CreateConstInBoundsGEP1_32(Int8Ty, EntryFP, -20);
SEHInfo = Builder.CreateBitCast(SEHInfo, Int8PtrTy->getPointerTo());
SEHInfo = Builder.CreateAlignedLoad(Int8PtrTy, SEHInfo, getPointerAlign());
SEHCodeSlotStack.push_back(recoverAddrOfEscapedLocal(
ParentCGF, ParentCGF.SEHCodeSlotStack.back(), ParentFP));
Expand All @@ -2114,10 +2113,9 @@ void CodeGenFunction::EmitSEHExceptionCodeSave(CodeGenFunction &ParentCGF,
// CONTEXT *ContextRecord;
// };
// int exceptioncode = exception_pointers->ExceptionRecord->ExceptionCode;
llvm::Type *RecordTy = CGM.Int32Ty->getPointerTo();
llvm::Type *RecordTy = llvm::PointerType::getUnqual(getLLVMContext());
llvm::Type *PtrsTy = llvm::StructType::get(RecordTy, CGM.VoidPtrTy);
llvm::Value *Ptrs = Builder.CreateBitCast(SEHInfo, PtrsTy->getPointerTo());
llvm::Value *Rec = Builder.CreateStructGEP(PtrsTy, Ptrs, 0);
llvm::Value *Rec = Builder.CreateStructGEP(PtrsTy, SEHInfo, 0);
Rec = Builder.CreateAlignedLoad(RecordTy, Rec, getPointerAlign());
llvm::Value *Code = Builder.CreateAlignedLoad(Int32Ty, Rec, getIntAlign());
assert(!SEHCodeSlotStack.empty() && "emitting EH code outside of __except");
Expand Down
11 changes: 4 additions & 7 deletions clang/lib/CodeGen/CGExprCXX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2195,13 +2195,12 @@ static llvm::Value *EmitTypeidFromVTable(CodeGenFunction &CGF, const Expr *E,
}

llvm::Value *CodeGenFunction::EmitCXXTypeidExpr(const CXXTypeidExpr *E) {
llvm::Type *StdTypeInfoPtrTy =
ConvertType(E->getType())->getPointerTo();
llvm::Type *PtrTy = llvm::PointerType::getUnqual(getLLVMContext());

if (E->isTypeOperand()) {
llvm::Constant *TypeInfo =
CGM.GetAddrOfRTTIDescriptor(E->getTypeOperand(getContext()));
return Builder.CreateBitCast(TypeInfo, StdTypeInfoPtrTy);
return TypeInfo;
}

// C++ [expr.typeid]p2:
Expand All @@ -2211,12 +2210,10 @@ llvm::Value *CodeGenFunction::EmitCXXTypeidExpr(const CXXTypeidExpr *E) {
// type) to which the glvalue refers.
// If the operand is already most derived object, no need to look up vtable.
if (E->isPotentiallyEvaluated() && !E->isMostDerived(getContext()))
return EmitTypeidFromVTable(*this, E->getExprOperand(),
StdTypeInfoPtrTy);
return EmitTypeidFromVTable(*this, E->getExprOperand(), PtrTy);

QualType OperandTy = E->getExprOperand()->getType();
return Builder.CreateBitCast(CGM.GetAddrOfRTTIDescriptor(OperandTy),
StdTypeInfoPtrTy);
return CGM.GetAddrOfRTTIDescriptor(OperandTy);
}

static llvm::Value *EmitDynamicCastToNull(CodeGenFunction &CGF,
Expand Down
14 changes: 2 additions & 12 deletions clang/lib/CodeGen/CGExprConstant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1833,9 +1833,6 @@ class ConstantLValueEmitter : public ConstStmtVisitor<ConstantLValueEmitter,
return C;

llvm::Type *origPtrTy = C->getType();
unsigned AS = origPtrTy->getPointerAddressSpace();
llvm::Type *charPtrTy = CGM.Int8Ty->getPointerTo(AS);
C = llvm::ConstantExpr::getBitCast(C, charPtrTy);
C = llvm::ConstantExpr::getGetElementPtr(CGM.Int8Ty, C, getOffset());
C = llvm::ConstantExpr::getPointerCast(C, origPtrTy);
return C;
Expand Down Expand Up @@ -1945,15 +1942,8 @@ ConstantLValueEmitter::tryEmitBase(const APValue::LValueBase &base) {
}

// Handle typeid(T).
if (TypeInfoLValue TI = base.dyn_cast<TypeInfoLValue>()) {
llvm::Type *StdTypeInfoPtrTy =
CGM.getTypes().ConvertType(base.getTypeInfoType())->getPointerTo();
llvm::Constant *TypeInfo =
CGM.GetAddrOfRTTIDescriptor(QualType(TI.getType(), 0));
if (TypeInfo->getType() != StdTypeInfoPtrTy)
TypeInfo = llvm::ConstantExpr::getBitCast(TypeInfo, StdTypeInfoPtrTy);
return TypeInfo;
}
if (TypeInfoLValue TI = base.dyn_cast<TypeInfoLValue>())
return CGM.GetAddrOfRTTIDescriptor(QualType(TI.getType(), 0));

// Otherwise, it must be an expression.
return Visit(base.get<const Expr*>());
Expand Down
9 changes: 3 additions & 6 deletions clang/lib/CodeGen/CGObjCRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,14 +364,14 @@ CGObjCRuntime::getMessageSendInfo(const ObjCMethodDecl *method,
CallArgList &callArgs) {
unsigned ProgramAS = CGM.getDataLayout().getProgramAddressSpace();

llvm::PointerType *signatureType =
llvm::PointerType::get(CGM.getLLVMContext(), ProgramAS);

// If there's a method, use information from that.
if (method) {
const CGFunctionInfo &signature =
CGM.getTypes().arrangeObjCMessageSendSignature(method, callArgs[0].Ty);

llvm::PointerType *signatureType =
CGM.getTypes().GetFunctionType(signature)->getPointerTo(ProgramAS);

const CGFunctionInfo &signatureForCall =
CGM.getTypes().arrangeCall(signature, callArgs);

Expand All @@ -382,9 +382,6 @@ CGObjCRuntime::getMessageSendInfo(const ObjCMethodDecl *method,
const CGFunctionInfo &argsInfo =
CGM.getTypes().arrangeUnprototypedObjCMessageSend(resultType, callArgs);

// Derive the signature to call from that.
llvm::PointerType *signatureType =
CGM.getTypes().GetFunctionType(argsInfo)->getPointerTo(ProgramAS);
return MessageSendInfo(argsInfo, signatureType);
}

Expand Down

0 comments on commit 0f4d48d

Please sign in to comment.