summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-07-26 07:03:04 +0000
committerChad Rosier <mcrosier@apple.com>2011-07-26 07:03:04 +0000
commit99ee7829ffcb91897596924801f3444963fcfe77 (patch)
treebded17cd37bc7c949974135a12e70e0a68cc2ae8 /clang/lib/AST/ASTContext.cpp
parentc22845abe239d9310ade80cd3f4931421035b297 (diff)
downloadbcm5719-llvm-99ee7829ffcb91897596924801f3444963fcfe77.tar.gz
bcm5719-llvm-99ee7829ffcb91897596924801f3444963fcfe77.zip
After further discussion it has been determined that alignof should report
the preferred alignment. Thus, revert r135934, r135935, and r135940. llvm-svn: 136062
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index c6e2c20df7d..5463b7b7b05 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -696,10 +696,7 @@ CharUnits ASTContext::getDeclAlign(const Decl *D, bool RefAsPointee) const {
// Walk through any array types while we're at it.
T = getBaseElementType(arrayType);
}
- if (Target.usePreferredTypeAlign())
- Align = std::max(Align, getPreferredTypeAlign(T.getTypePtr()));
- else
- Align = std::max(Align, getTypeAlign(T.getTypePtr()));
+ Align = std::max(Align, getPreferredTypeAlign(T.getTypePtr()));
}
// Fields can be subject to extra alignment constraints, like if
OpenPOWER on IntegriCloud