Rename MaxAlignment -> Alignment.
We can argue about a maximum alignment of a group of symbols,
but for each symbol, there is only one alignment.
So it is a bit weird that each symbol has a "maximum alignment".
llvm-svn: 263151
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index 7203d54..f711520 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -107,8 +107,7 @@
}
static int compareCommons(DefinedCommon *A, DefinedCommon *B) {
- A->MaxAlignment = B->MaxAlignment =
- std::max(A->MaxAlignment, B->MaxAlignment);
+ A->Alignment = B->Alignment = std::max(A->Alignment, B->Alignment);
if (A->Size < B->Size)
return -1;
return 1;
@@ -191,10 +190,8 @@
DefinedCommon::DefinedCommon(StringRef N, uint64_t Size, uint64_t Alignment,
bool IsWeak, uint8_t Visibility)
: Defined(SymbolBody::DefinedCommonKind, N, IsWeak, Visibility,
- 0 /* Type */) {
- MaxAlignment = Alignment;
- this->Size = Size;
-}
+ 0 /* Type */),
+ Alignment(Alignment), Size(Size) {}
std::unique_ptr<InputFile> Lazy::getMember() {
MemoryBufferRef MBRef = File->getMember(&Sym);