forked from OSchip/llvm-project
parent
84f5b0df8e
commit
7da94a58a0
|
@ -51,27 +51,26 @@ template <class ELFT> int SymbolBody::compare(SymbolBody *Other) {
|
|||
if (L != R)
|
||||
return -1;
|
||||
|
||||
if (L.first && L.second) {
|
||||
if (isCommon()) {
|
||||
if (Other->isCommon()) {
|
||||
auto *ThisC = cast<DefinedCommon<ELFT>>(this);
|
||||
auto *OtherC = cast<DefinedCommon<ELFT>>(Other);
|
||||
typename DefinedCommon<ELFT>::uintX_t MaxAlign =
|
||||
std::max(ThisC->MaxAlignment, OtherC->MaxAlignment);
|
||||
if (ThisC->Sym.st_size >= OtherC->Sym.st_size) {
|
||||
ThisC->MaxAlignment = MaxAlign;
|
||||
return 1;
|
||||
}
|
||||
OtherC->MaxAlignment = MaxAlign;
|
||||
return -1;
|
||||
if (!L.first || !L.second)
|
||||
return 1;
|
||||
if (isCommon()) {
|
||||
if (Other->isCommon()) {
|
||||
auto *ThisC = cast<DefinedCommon<ELFT>>(this);
|
||||
auto *OtherC = cast<DefinedCommon<ELFT>>(Other);
|
||||
typename DefinedCommon<ELFT>::uintX_t MaxAlign =
|
||||
std::max(ThisC->MaxAlignment, OtherC->MaxAlignment);
|
||||
if (ThisC->Sym.st_size >= OtherC->Sym.st_size) {
|
||||
ThisC->MaxAlignment = MaxAlign;
|
||||
return 1;
|
||||
}
|
||||
OtherC->MaxAlignment = MaxAlign;
|
||||
return -1;
|
||||
}
|
||||
if (Other->isCommon())
|
||||
return 1;
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
if (Other->isCommon())
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::unique_ptr<InputFile> Lazy::getMember() {
|
||||
|
|
Loading…
Reference in New Issue