From: Daniel Dunbar Date: Tue, 21 Apr 2009 00:49:20 +0000 (+0000) Subject: Remove LateBoundIVars() runtime interface, it is unused. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6bf2ae05c777052e5ec05649710380dea263e7e0;p=clang Remove LateBoundIVars() runtime interface, it is unused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69641 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index a073c44256..01bbc84050 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -1131,14 +1131,6 @@ LValue CodeGenFunction::EmitObjCMessageExprLValue(const ObjCMessageExpr *E) { llvm::Value *CodeGenFunction::EmitIvarOffset(ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar) { - // Objective-C objects are traditionally C structures with their layout - // defined at compile-time. In some implementations, their layout is not - // defined until run time in order to allow instance variables to be added to - // a class without recompiling all of the subclasses. If this is the case - // then the CGObjCRuntime subclass must return true to LateBoundIvars and - // implement the lookup itself. - if (CGM.getObjCRuntime().LateBoundIVars()) - assert(0 && "late-bound ivars are unsupported"); return CGM.getObjCRuntime().EmitIvarOffset(*this, Interface, Ivar); } @@ -1147,10 +1139,6 @@ LValue CodeGenFunction::EmitLValueForIvar(QualType ObjectTy, const ObjCIvarDecl *Ivar, const FieldDecl *Field, unsigned CVRQualifiers) { - // See comment in EmitIvarOffset. - if (CGM.getObjCRuntime().LateBoundIVars()) - assert(0 && "late-bound ivars are unsupported"); - return CGM.getObjCRuntime().EmitObjCValueForIvar(*this, ObjectTy, BaseValue, Ivar, Field, CVRQualifiers); } diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index b5cd36061f..46e20c99ee 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -733,9 +733,6 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) { const_cast(OID->getClassInterface()); std::string ClassName = ClassDecl->getNameAsString(); - // This is required by newer ObjC runtimes. - assert(!LateBoundIVars() &&"Late-bound instance variables not yet supported"); - // Get the size of instances. For runtimes that support late-bound instances // this should probably be something different (size just of instance // varaibles in this class, not superclasses?). diff --git a/lib/CodeGen/CGObjCRuntime.h b/lib/CodeGen/CGObjCRuntime.h index 65bf52c5e2..262467ae19 100644 --- a/lib/CodeGen/CGObjCRuntime.h +++ b/lib/CodeGen/CGObjCRuntime.h @@ -137,19 +137,13 @@ public: /// EnumerationMutationFunction - Return the function that's called by the /// compiler when a mutation is detected during foreach iteration. virtual llvm::Constant *EnumerationMutationFunction() = 0; - - /// If instance variable addresses are determined at runtime then this should - /// return true, otherwise instance variables will be accessed directly from - /// the structure. If this returns true then @defs is invalid for this - /// runtime and a warning should be generated. - virtual bool LateBoundIVars() const { return false; } - + virtual void EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF, const Stmt &S) = 0; virtual void EmitThrowStmt(CodeGen::CodeGenFunction &CGF, const ObjCAtThrowStmt &S) = 0; - virtual llvm::Value * EmitObjCWeakRead(CodeGen::CodeGenFunction &CGF, - llvm::Value *AddrWeakObj) = 0; + virtual llvm::Value *EmitObjCWeakRead(CodeGen::CodeGenFunction &CGF, + llvm::Value *AddrWeakObj) = 0; virtual void EmitObjCWeakAssign(CodeGen::CodeGenFunction &CGF, llvm::Value *src, llvm::Value *dest) = 0; virtual void EmitObjCGlobalAssign(CodeGen::CodeGenFunction &CGF,