[cfe-commits] r70689 - /cfe/trunk/lib/AST/ExprConstant.cpp

Daniel Dunbar daniel at zuster.org
Sun May 3 03:36:16 PDT 2009


Author: ddunbar
Date: Sun May  3 05:35:52 2009
New Revision: 70689

URL: http://llvm.org/viewvc/llvm-project?rev=70689&view=rev
Log:
Remove an unneeded special case.

Modified:
    cfe/trunk/lib/AST/ExprConstant.cpp

Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=70689&r1=70688&r2=70689&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Sun May  3 05:35:52 2009
@@ -1067,17 +1067,8 @@
   if (!SrcTy->isConstantSizeType())
     return false;
 
-  unsigned BitWidth = 0;
-  if (SrcTy->isObjCInterfaceType()) {
-    // Slightly unusual case: the size of an ObjC interface type is the
-    // size of the class.
-    ObjCInterfaceDecl *OI = SrcTy->getAsObjCInterfaceType()->getDecl();
-    const ASTRecordLayout &Layout = Info.Ctx.getASTObjCInterfaceLayout(OI);
-    BitWidth = Layout.getSize();
-  } else
-    BitWidth = Info.Ctx.getTypeSize(SrcTy);
-
   // Get information about the size.
+  unsigned BitWidth = Info.Ctx.getTypeSize(SrcTy);
   return Success(BitWidth / Info.Ctx.Target.getCharWidth(), E);
 }
 





More information about the cfe-commits mailing list