Skip to content

Commit a641910

Browse files
authored
[clang][CGObjC] Remove unused ExternalProtocolPtrTy (NFC) (#133870)
This function was previously used to get a type to the protocol that was used to bitcast the initializer of GenerateProtocol. This bitcast has later been removed (thanks to opaque pointers), but the member was left behind. History: - 020de32 used ExternalProtocolPtrTy - 34ee69b removes the bitcast Also technically part of #123569
1 parent 70a2075 commit a641910

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

clang/lib/CodeGen/CGObjCMac.cpp

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -184,25 +184,6 @@ class ObjCCommonTypesHelper {
184184
/// SelectorPtrTy - LLVM type for selector handles (typeof(SEL))
185185
llvm::PointerType *SelectorPtrTy;
186186

187-
private:
188-
/// ProtocolPtrTy - LLVM type for external protocol handles
189-
/// (typeof(Protocol))
190-
llvm::Type *ExternalProtocolPtrTy;
191-
192-
public:
193-
llvm::Type *getExternalProtocolPtrTy() {
194-
if (!ExternalProtocolPtrTy) {
195-
// FIXME: It would be nice to unify this with the opaque type, so that the
196-
// IR comes out a bit cleaner.
197-
CodeGen::CodeGenTypes &Types = CGM.getTypes();
198-
ASTContext &Ctx = CGM.getContext();
199-
llvm::Type *T = Types.ConvertType(Ctx.getObjCProtoType());
200-
ExternalProtocolPtrTy = llvm::PointerType::getUnqual(T);
201-
}
202-
203-
return ExternalProtocolPtrTy;
204-
}
205-
206187
// SuperCTy - clang type for struct objc_super.
207188
QualType SuperCTy;
208189
// SuperPtrCTy - clang type for struct objc_super *.
@@ -5636,8 +5617,7 @@ CGObjCNonFragileABIMac::CGObjCNonFragileABIMac(CodeGen::CodeGenModule &cgm)
56365617
/* *** */
56375618

56385619
ObjCCommonTypesHelper::ObjCCommonTypesHelper(CodeGen::CodeGenModule &cgm)
5639-
: VMContext(cgm.getLLVMContext()), CGM(cgm),
5640-
ExternalProtocolPtrTy(nullptr) {
5620+
: VMContext(cgm.getLLVMContext()), CGM(cgm) {
56415621
CodeGen::CodeGenTypes &Types = CGM.getTypes();
56425622
ASTContext &Ctx = CGM.getContext();
56435623
unsigned ProgramAS = CGM.getDataLayout().getProgramAddressSpace();

0 commit comments

Comments
 (0)