summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LowerEmuTLS.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:51:42 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:51:42 +0000
commit1d5ae1026e831016fc29fd927877c86af904481f (patch)
tree2cdfd12620fcfa5d9e4a0389f85368e8e36f63f9 /lib/CodeGen/LowerEmuTLS.cpp
parente6d1592492a3a379186bfb02bd0f4eda0669c0d5 (diff)
Diffstat (limited to 'lib/CodeGen/LowerEmuTLS.cpp')
-rw-r--r--lib/CodeGen/LowerEmuTLS.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/CodeGen/LowerEmuTLS.cpp b/lib/CodeGen/LowerEmuTLS.cpp
index c8cf6abda4fc..ed48365b0102 100644
--- a/lib/CodeGen/LowerEmuTLS.cpp
+++ b/lib/CodeGen/LowerEmuTLS.cpp
@@ -142,7 +142,7 @@ bool LowerEmuTLS::addEmuTlsVar(Module &M, const GlobalVariable *GV) {
assert(EmuTlsTmplVar && "Failed to create emualted TLS initializer");
EmuTlsTmplVar->setConstant(true);
EmuTlsTmplVar->setInitializer(const_cast<Constant*>(InitValue));
- EmuTlsTmplVar->setAlignment(GVAlignment);
+ EmuTlsTmplVar->setAlignment(Align(GVAlignment));
copyLinkageVisibility(M, GV, EmuTlsTmplVar);
}
@@ -155,9 +155,8 @@ bool LowerEmuTLS::addEmuTlsVar(Module &M, const GlobalVariable *GV) {
ArrayRef<Constant*> ElementValueArray(ElementValues, 4);
EmuTlsVar->setInitializer(
ConstantStruct::get(EmuTlsVarType, ElementValueArray));
- unsigned MaxAlignment = std::max(
- DL.getABITypeAlignment(WordType),
- DL.getABITypeAlignment(VoidPtrType));
+ Align MaxAlignment(std::max(DL.getABITypeAlignment(WordType),
+ DL.getABITypeAlignment(VoidPtrType)));
EmuTlsVar->setAlignment(MaxAlignment);
return true;
}