diff options
author | Erich Keane <erich.keane@intel.com> | 2019-10-11 14:59:44 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2019-10-11 14:59:44 +0000 |
commit | f759395994212fbefbd540cd4565c6b4fa304ecd (patch) | |
tree | 817db539045c22d210c90e84975282088fde81ce /clang/lib/CodeGen/CGCall.cpp | |
parent | c4995076c6bd3706918930de436246ec4257c364 (diff) | |
download | llvm-f759395994212fbefbd540cd4565c6b4fa304ecd.zip llvm-f759395994212fbefbd540cd4565c6b4fa304ecd.tar.gz llvm-f759395994212fbefbd540cd4565c6b4fa304ecd.tar.bz2 |
Reland r374450 with Richard Smith's comments and test fixed.
The behavior from the original patch has changed, since we're no longer
allowing LLVM to just ignore the alignment. Instead, we're just
assuming the maximum possible alignment.
Differential Revision: https://reviews.llvm.org/D68824
llvm-svn: 374562
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 682a7cc..2ec9e91 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -4569,7 +4569,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, llvm::Value *Alignment = EmitScalarExpr(AA->getAlignment()); llvm::ConstantInt *AlignmentCI = cast<llvm::ConstantInt>(Alignment); EmitAlignmentAssumption(Ret.getScalarVal(), RetTy, Loc, AA->getLocation(), - AlignmentCI->getZExtValue(), OffsetValue); + AlignmentCI, OffsetValue); } else if (const auto *AA = TargetDecl->getAttr<AllocAlignAttr>()) { llvm::Value *AlignmentVal = CallArgs[AA->getParamIndex().getLLVMIndex()] .getRValue(*this) |