summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2019-09-23 09:04:12 +0000
committerGuillaume Chatelet <gchatelet@google.com>2019-09-23 09:04:12 +0000
commitf7caf3cac8487c7876b8249c7c9c5d7131e013b9 (patch)
treea0895d586f421f7cb555871bae728faa2bcd3848 /clang/lib/CodeGen/CGCall.cpp
parent93ca36d756d84310bd01c74f35dbdddf4d3035f9 (diff)
downloadbcm5719-llvm-f7caf3cac8487c7876b8249c7c9c5d7131e013b9.tar.gz
bcm5719-llvm-f7caf3cac8487c7876b8249c7c9c5d7131e013b9.zip
[Alignment] fix build
llvm-svn: 372562
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 00180d96cf0..7fa262ca6e8 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -4132,11 +4132,12 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
auto scalarAlign = CGM.getDataLayout().getPrefTypeAlignment(scalarType);
// Materialize to a temporary.
- addr = CreateTempAlloca(RV.getScalarVal()->getType(),
- CharUnits::fromQuantity(std::max(
- layout->getAlignment(), scalarAlign)),
- "tmp",
- /*ArraySize=*/nullptr, &AllocaAddr);
+ addr = CreateTempAlloca(
+ RV.getScalarVal()->getType(),
+ CharUnits::fromQuantity(std::max(
+ (unsigned)layout->getAlignment().value(), scalarAlign)),
+ "tmp",
+ /*ArraySize=*/nullptr, &AllocaAddr);
tempSize = EmitLifetimeStart(scalarSize, AllocaAddr.getPointer());
Builder.CreateStore(RV.getScalarVal(), addr);
OpenPOWER on IntegriCloud