]> granicus.if.org Git - clang/commitdiff
Remove LateBoundIVars() runtime interface, it is unused.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 21 Apr 2009 00:49:20 +0000 (00:49 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 21 Apr 2009 00:49:20 +0000 (00:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69641 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGObjCGNU.cpp
lib/CodeGen/CGObjCRuntime.h

index a073c442561248eef45a7b655f75624ae9d1fb9a..01bbc8405022001dcfad4f897459e39b1cc1af88 100644 (file)
@@ -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);
 }
index b5cd36061f75e8c2fdde472a3a3041e730bdf8a0..46e20c99ee37da49a89d3607a73a5a8ce68c235a 100644 (file)
@@ -733,9 +733,6 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) {
     const_cast<ObjCInterfaceDecl *>(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?).
index 65bf52c5e205a51a92fcd9e58aec9f0e09b36e8d..262467ae192693da5b1c8dacdca3980e9c64ecb9 100644 (file)
@@ -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,