aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-05-03 10:35:52 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-05-03 10:35:52 +0000
commit24cbfb96f09318f59dc73eaaf4909a79788ec5ac (patch)
treeb712ecfce247374c3ddd03b087407c843edba40f /lib/AST/ExprConstant.cpp
parente5393fb93eb879d9ebbef102ae9311fa77e023cc (diff)
Remove an unneeded special case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70689 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r--lib/AST/ExprConstant.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index 5d92e99a06..aa4920f719 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -1067,17 +1067,8 @@ bool IntExprEvaluator::VisitSizeOfAlignOfExpr(const SizeOfAlignOfExpr *E) {
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);
}