summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SjLjEHPrepare.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2019-10-25 22:26:23 +0200
committerGuillaume Chatelet <gchatelet@google.com>2019-10-25 22:41:34 +0200
commite8a0a0904b2b144929312ac424626b3e026bf9fb (patch)
tree4cf92c40bfdf67a1f2f8fe44ca2ede43c5826266 /llvm/lib/CodeGen/SjLjEHPrepare.cpp
parent03de2f84fc4acf06c719cd007b5459c9d4d0a20c (diff)
downloadbcm5719-llvm-e8a0a0904b2b144929312ac424626b3e026bf9fb.tar.gz
bcm5719-llvm-e8a0a0904b2b144929312ac424626b3e026bf9fb.zip
[Alignment][NFC] Convert AllocaInst to MaybeAlign
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Reviewed By: courbet Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69301
Diffstat (limited to 'llvm/lib/CodeGen/SjLjEHPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/SjLjEHPrepare.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SjLjEHPrepare.cpp b/llvm/lib/CodeGen/SjLjEHPrepare.cpp
index db520d4e640..3f94a6af229 100644
--- a/llvm/lib/CodeGen/SjLjEHPrepare.cpp
+++ b/llvm/lib/CodeGen/SjLjEHPrepare.cpp
@@ -175,9 +175,9 @@ Value *SjLjEHPrepare::setupFunctionContext(Function &F,
// that needs to be restored on all exits from the function. This is an alloca
// because the value needs to be added to the global context list.
auto &DL = F.getParent()->getDataLayout();
- unsigned Align = DL.getPrefTypeAlignment(FunctionContextTy);
- FuncCtx = new AllocaInst(FunctionContextTy, DL.getAllocaAddrSpace(),
- nullptr, Align, "fn_context", &EntryBB->front());
+ const Align Alignment(DL.getPrefTypeAlignment(FunctionContextTy));
+ FuncCtx = new AllocaInst(FunctionContextTy, DL.getAllocaAddrSpace(), nullptr,
+ Alignment, "fn_context", &EntryBB->front());
// Fill in the function context structure.
for (LandingPadInst *LPI : LPads) {
OpenPOWER on IntegriCloud