summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-11-25 17:48:21 +0000
committerChris Lattner <sabre@nondot.org>2007-11-25 17:48:21 +0000
commit852ed06d60b94b2ab302b238028dcd5ddf22fe1b (patch)
tree8056bdf84caf72a12fe242b55f21a04e4c53c91a
parent185eeac0f8ebc3ea9cf34068aab18b035625b2c0 (diff)
downloadbcm5719-llvm-852ed06d60b94b2ab302b238028dcd5ddf22fe1b.tar.gz
bcm5719-llvm-852ed06d60b94b2ab302b238028dcd5ddf22fe1b.zip
sizeof() return size in bytes, not bits, patch by Nuno Lopes!
llvm-svn: 44316
-rw-r--r--clang/AST/Expr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/AST/Expr.cpp b/clang/AST/Expr.cpp
index fa1a3c95fff..77221392f23 100644
--- a/clang/AST/Expr.cpp
+++ b/clang/AST/Expr.cpp
@@ -589,7 +589,7 @@ bool Expr::isIntegerConstantExpr(llvm::APSInt &Result, ASTContext &Ctx,
// Get information about the size or align.
if (Exp->getOpcode() == UnaryOperator::SizeOf)
Result = Ctx.getTypeSize(Exp->getSubExpr()->getType(),
- Exp->getOperatorLoc());
+ Exp->getOperatorLoc()) / 8;
else
Result = Ctx.getTypeAlign(Exp->getSubExpr()->getType(),
Exp->getOperatorLoc());
OpenPOWER on IntegriCloud