diff options
author | Davide Italiano <davide@freebsd.org> | 2017-04-03 16:51:39 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2017-04-03 16:51:39 +0000 |
commit | 7a3b69d0960061da2e0110e4744e94a25ffa92de (patch) | |
tree | e12564308b9faa090680ff346d5791c96016108b | |
parent | 348c144d50fbb324821db19ba4beeb7d31c8d835 (diff) | |
download | bcm5719-llvm-7a3b69d0960061da2e0110e4744e94a25ffa92de.tar.gz bcm5719-llvm-7a3b69d0960061da2e0110e4744e94a25ffa92de.zip |
[TargetInfo] Use llvm::alignOf() instead of rewriting it. NFCI.
llvm-svn: 299364
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 34128f32213..fadbcea9b03 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -4917,7 +4917,7 @@ ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType Ty) const { return coerceToIntArray(Ty, getContext(), getVMContext()); } unsigned Alignment = getContext().getTypeAlign(Ty); - Size = 64 * ((Size + 63) / 64); // round up to multiple of 8 bytes + Size = llvm::alignTo(Size, 64); // round up to multiple of 8 bytes // We use a pair of i64 for 16-byte aggregate with 8-byte alignment. // For aggregates with 16-byte alignment, we use i128. @@ -4967,7 +4967,7 @@ ABIArgInfo AArch64ABIInfo::classifyReturnType(QualType RetTy) const { return coerceToIntArray(RetTy, getContext(), getVMContext()); } unsigned Alignment = getContext().getTypeAlign(RetTy); - Size = 64 * ((Size + 63) / 64); // round up to multiple of 8 bytes + Size = llvm::alignTo(Size, 64); // round up to multiple of 8 bytes // We use a pair of i64 for 16-byte aggregate with 8-byte alignment. // For aggregates with 16-byte alignment, we use i128. |