diff options
Diffstat (limited to 'lib/CodeGen/LowerEmuTLS.cpp')
-rw-r--r-- | lib/CodeGen/LowerEmuTLS.cpp | 7 |
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; } |