From 3f8c01a11029a0c7122426e93c1f9103c60aead3 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sun, 22 Feb 2009 03:31:23 +0000 Subject: Fix for PR3433: map __alignof__ to preferred alignment. (This was partially done in r65258.) llvm-svn: 65260 --- clang/lib/AST/ExprConstant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/AST/ExprConstant.cpp') diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index e3c48091b5e..103bc37f4fe 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -960,7 +960,7 @@ unsigned IntExprEvaluator::GetAlignOfType(QualType T) { // Get information about the alignment. unsigned CharSize = Info.Ctx.Target.getCharWidth(); - return Info.Ctx.getTypeAlign(Ty) / CharSize; + return Info.Ctx.getPreferredTypeAlign(Ty) / CharSize; } unsigned IntExprEvaluator::GetAlignOfExpr(const Expr *E) { -- cgit v1.2.3