[cfe-commits] r44316 - /cfe/trunk/AST/Expr.cpp
Chris Lattner
sabre at nondot.org
Sun Nov 25 09:48:23 PST 2007
Author: lattner
Date: Sun Nov 25 11:48:21 2007
New Revision: 44316
URL: http://llvm.org/viewvc/llvm-project?rev=44316&view=rev
Log:
sizeof() return size in bytes, not bits, patch by Nuno Lopes!
Modified:
cfe/trunk/AST/Expr.cpp
Modified: cfe/trunk/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/Expr.cpp?rev=44316&r1=44315&r2=44316&view=diff
==============================================================================
--- cfe/trunk/AST/Expr.cpp (original)
+++ cfe/trunk/AST/Expr.cpp Sun Nov 25 11:48:21 2007
@@ -589,7 +589,7 @@
// 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());
More information about the cfe-commits
mailing list