aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/GlobalMerge.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2020-06-29 11:24:36 +0000
committerGuillaume Chatelet <gchatelet@google.com>2020-06-29 11:24:36 +0000
commit368a5e3a666ff38432be538370c46ff800fface1 (patch)
tree3b6b1b3586051f5fe8f5358d0b0b51235097796d /llvm/lib/CodeGen/GlobalMerge.cpp
parent3521ecf1f8a3cf5e4811f93a9a809fc722462bbf (diff)
downloadllvm-368a5e3a666ff38432be538370c46ff800fface1.zip
llvm-368a5e3a666ff38432be538370c46ff800fface1.tar.gz
llvm-368a5e3a666ff38432be538370c46ff800fface1.tar.bz2
[Alignment][NFC] migrate DataLayout::getPreferredAlignment
This 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 Differential Revision: https://reviews.llvm.org/D82752
Diffstat (limited to 'llvm/lib/CodeGen/GlobalMerge.cpp')
-rw-r--r--llvm/lib/CodeGen/GlobalMerge.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/GlobalMerge.cpp b/llvm/lib/CodeGen/GlobalMerge.cpp
index 6d736aa..1e20c02 100644
--- a/llvm/lib/CodeGen/GlobalMerge.cpp
+++ b/llvm/lib/CodeGen/GlobalMerge.cpp
@@ -464,7 +464,7 @@ bool GlobalMerge::doMerge(const SmallVectorImpl<GlobalVariable *> &Globals,
Type *Ty = Globals[j]->getValueType();
// Make sure we use the same alignment AsmPrinter would use.
- Align Alignment(DL.getPreferredAlignment(Globals[j]));
+ Align Alignment = DL.getPreferredAlign(Globals[j]);
unsigned Padding = alignTo(MergedSize, Alignment) - MergedSize;
MergedSize += Padding;
MergedSize += DL.getTypeAllocSize(Ty);