summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2015-11-02 19:32:23 +0000
committerTim Northover <tnorthover@apple.com>2015-11-02 19:32:23 +0000
commit4c5cb9c1da64f9cf7487bdf47e0bcee97d4b86aa (patch)
treeae68f42ba37c6a6672f8508e13465084e8f6da2d /clang/lib/CodeGen/TargetInfo.cpp
parent998c8a1c1c1cd0fa1cb1e1368abc52ba23caa987 (diff)
downloadbcm5719-llvm-4c5cb9c1da64f9cf7487bdf47e0bcee97d4b86aa.tar.gz
bcm5719-llvm-4c5cb9c1da64f9cf7487bdf47e0bcee97d4b86aa.zip
Fix va_arg on watchOS.
As in other contexts, alignments can go up to 16 bytes in a va_list. llvm-svn: 251821
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 9b5ac4fc6ce..0131f9dbb1a 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -5301,6 +5301,10 @@ Address ARMABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
getABIKind() == ARMABIInfo::AAPCS) {
TyAlignForABI = std::max(TyAlignForABI, CharUnits::fromQuantity(4));
TyAlignForABI = std::min(TyAlignForABI, CharUnits::fromQuantity(8));
+ } else if (getABIKind() == ARMABIInfo::AAPCS16_VFP) {
+ // ARMv7k allows type alignment up to 16 bytes.
+ TyAlignForABI = std::max(TyAlignForABI, CharUnits::fromQuantity(4));
+ TyAlignForABI = std::min(TyAlignForABI, CharUnits::fromQuantity(16));
} else {
TyAlignForABI = CharUnits::fromQuantity(4);
}
OpenPOWER on IntegriCloud