Index: src/IceELFObjectWriter.cpp |
diff --git a/src/IceELFObjectWriter.cpp b/src/IceELFObjectWriter.cpp |
index 26e76f01cbac80960f8fcac0542773fd57ffa862..98b774b18efcd5328ba4042bdb57b63c6a190969 100644 |
--- a/src/IceELFObjectWriter.cpp |
+++ b/src/IceELFObjectWriter.cpp |
@@ -388,9 +388,8 @@ void ELFObjectWriter::writeDataOfType(SectionType ST, |
// entry will be created separately. |
if (!Var->hasInitializer()) |
continue; |
- Elf64_Xword Align = Var->getAlignment(); |
constexpr Elf64_Xword MinAlign = 1; |
- Align = std::max(Align, MinAlign); |
+ const auto Align = std::max<Elf64_Xword>(MinAlign, Var->getAlignment()); |
Section->padToAlignment(Str, Align); |
SizeT SymbolSize = Var->getNumBytes(); |
bool IsExternal = Var->isExternal() || Ctx.getFlags().getDisableInternal(); |