[cfe-commits] r69641 - in /cfe/trunk/lib/CodeGen: CGExpr.cpp CGObjCGNU.cpp CGObjCRuntime.h

Daniel Dunbar daniel at zuster.org
Mon Apr 20 17:49:20 PDT 2009


Author: ddunbar
Date: Mon Apr 20 19:49:20 2009
New Revision: 69641

URL: http://llvm.org/viewvc/llvm-project?rev=69641&view=rev
Log:
Remove LateBoundIVars() runtime interface, it is unused.

Modified:
    cfe/trunk/lib/CodeGen/CGExpr.cpp
    cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
    cfe/trunk/lib/CodeGen/CGObjCRuntime.h

Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=69641&r1=69640&r2=69641&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Mon Apr 20 19:49:20 2009
@@ -1131,14 +1131,6 @@
 
 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 @@
                                           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);
 }

Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=69641&r1=69640&r2=69641&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Mon Apr 20 19:49:20 2009
@@ -733,9 +733,6 @@
     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?).

Modified: cfe/trunk/lib/CodeGen/CGObjCRuntime.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCRuntime.h?rev=69641&r1=69640&r2=69641&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCRuntime.h (original)
+++ cfe/trunk/lib/CodeGen/CGObjCRuntime.h Mon Apr 20 19:49:20 2009
@@ -137,19 +137,13 @@
   /// 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,





More information about the cfe-commits mailing list