summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
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
commitbc5a7a889428ba4d149322debca79190fb5d83ea (patch)
tree10f92fa772a1c35dec02964053c68b1f1bf08d1a /clang/lib/AST
parentd58929be463b6a10e86a375020e6289d01ebb807 (diff)
downloadbcm5719-llvm-bc5a7a889428ba4d149322debca79190fb5d83ea.tar.gz
bcm5719-llvm-bc5a7a889428ba4d149322debca79190fb5d83ea.zip
Remove an unneeded special case.
llvm-svn: 70689
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/ExprConstant.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 5d92e99a06d..aa4920f7198 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud