summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorAndrey Turetskiy <andrey.turetskiy@gmail.com>2016-02-10 11:58:46 +0000
committerAndrey Turetskiy <andrey.turetskiy@gmail.com>2016-02-10 11:58:46 +0000
commitdb6655fd902a9f012e26b63033001e52dbbc1db6 (patch)
tree75b9c478e0eae6b6fd4cc6af72e3e2fb0ada16de /clang/lib/AST/ASTContext.cpp
parent2396c38a8a9962d23f66357b0932cf2795b0f360 (diff)
downloadbcm5719-llvm-db6655fd902a9f012e26b63033001e52dbbc1db6.tar.gz
bcm5719-llvm-db6655fd902a9f012e26b63033001e52dbbc1db6.zip
[X86] Fix stack alignment for MCU target (Clang part), by Anton Nadolskiy.
This patch fixes stack alignments for MCU (should be aligned to 4 bytes). Differential Revision: http://reviews.llvm.org/D15647 llvm-svn: 260376
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 06fb46e2f7f..eba35786e81 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1904,8 +1904,8 @@ unsigned ASTContext::getPreferredTypeAlign(const Type *T) const {
if (T->isMemberPointerType())
return getPreferredTypeAlign(getPointerDiffType().getTypePtr());
- if (Target->getTriple().getArch() == llvm::Triple::xcore)
- return ABIAlign; // Never overalign on XCore.
+ if (!Target->allowsLargerPreferedTypeAlignment())
+ return ABIAlign;
// Double and long long should be naturally aligned if possible.
if (const ComplexType *CT = T->getAs<ComplexType>())
OpenPOWER on IntegriCloud