Fix for PR3433: map __alignof__ to preferred alignment. (This was
partially done in r65258.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65260 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index e3c4809..103bc37 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -960,7 +960,7 @@
// 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) {