[lld] r255853 - Typedef uintX_t at beginning of a function just like others.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 16 15:49:20 PST 2015
Author: ruiu
Date: Wed Dec 16 17:49:19 2015
New Revision: 255853
URL: http://llvm.org/viewvc/llvm-project?rev=255853&view=rev
Log:
Typedef uintX_t at beginning of a function just like others.
Modified:
lld/trunk/ELF/Symbols.cpp
Modified: lld/trunk/ELF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=255853&r1=255852&r2=255853&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.cpp (original)
+++ lld/trunk/ELF/Symbols.cpp Wed Dec 16 17:49:19 2015
@@ -32,6 +32,7 @@ static uint8_t getMinVisibility(uint8_t
// Returns 1, 0 or -1 if this symbol should take precedence
// over the Other, tie or lose, respectively.
template <class ELFT> int SymbolBody::compare(SymbolBody *Other) {
+ typedef typename ELFFile<ELFT>::uintX_t uintX_t;
assert(!isLazy() && !Other->isLazy());
std::pair<bool, bool> L(isDefined(), !isWeak());
std::pair<bool, bool> R(Other->isDefined(), !Other->isWeak());
@@ -59,13 +60,12 @@ template <class ELFT> int SymbolBody::co
return -1;
auto *ThisC = cast<DefinedCommon<ELFT>>(this);
auto *OtherC = cast<DefinedCommon<ELFT>>(Other);
- typename DefinedCommon<ELFT>::uintX_t MaxAlign =
- std::max(ThisC->MaxAlignment, OtherC->MaxAlignment);
+ uintX_t Align = std::max(ThisC->MaxAlignment, OtherC->MaxAlignment);
if (ThisC->Sym.st_size >= OtherC->Sym.st_size) {
- ThisC->MaxAlignment = MaxAlign;
+ ThisC->MaxAlignment = Align;
return 1;
}
- OtherC->MaxAlignment = MaxAlign;
+ OtherC->MaxAlignment = Align;
return -1;
}
if (Other->isCommon())
More information about the llvm-commits
mailing list