]> granicus.if.org Git - clang/commitdiff
IRgen/NeXT: Remove my refactoring-enabling asserts, and add a FIXME.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 2 Apr 2010 22:29:40 +0000 (22:29 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 2 Apr 2010 22:29:40 +0000 (22:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100237 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCMac.cpp

index 0838a57241ce2fb0e08791764c617335d31f183d..5373390ef7e8887ccad305867146afe46ddc9013 100644 (file)
@@ -48,18 +48,9 @@ static uint64_t LookupFieldBitOffset(CodeGen::CodeGenModule &CGM,
                                      const ObjCIvarDecl *Ivar) {
   const ObjCInterfaceDecl *Container = Ivar->getContainingInterface();
 
-  // Check that the Obj-C decl contexts match what we expect.
-  const ObjCContainerDecl *DC = cast<ObjCContainerDecl>(Ivar->getDeclContext());
-  assert(isa<ObjCInterfaceDecl>(DC) || isa<ObjCImplDecl>(DC) ||
-         isa<ObjCCategoryDecl>(DC));
-  if (isa<ObjCImplDecl>(DC)) {
-    assert(DC == ID);
-    assert(Container == cast<ObjCImplDecl>(DC)->getClassInterface());
-  } else if (isa<ObjCCategoryDecl>(DC)) {
-    assert(Container == cast<ObjCCategoryDecl>(DC)->getClassInterface());
-  }  else {
-    assert(Container == DC);
-  }
+  // FIXME: We should eliminate the need to have ObjCImplementationDecl passed
+  // in here; it should never be necessary because that should be the lexical
+  // decl context for the ivar.
 
   // If we know have an implementation (and the ivar is in it) then
   // look up in the implementation layout.