Make a member function non-member. NFC.

Non-member functions are generally preferred over member functions
because it is clear that non-member functions don't depend on an
internal state of an object.

llvm-svn: 342695
This commit is contained in:
Rui Ueyama 2018-09-20 22:58:00 +00:00
parent 2908b384ed
commit 180cd0717f
1 changed files with 1 additions and 2 deletions

View File

@ -77,7 +77,6 @@ private:
void addRelIpltSymbols(); void addRelIpltSymbols();
void addStartEndSymbols(); void addStartEndSymbols();
void addStartStopSymbols(OutputSection *Sec); void addStartStopSymbols(OutputSection *Sec);
uint64_t getEntryAddr();
std::vector<PhdrEntry *> Phdrs; std::vector<PhdrEntry *> Phdrs;
@ -2206,7 +2205,7 @@ template <class ELFT> void Writer<ELFT>::checkSections() {
// 4. the number represented by the entry symbol, if it is a number; // 4. the number represented by the entry symbol, if it is a number;
// 5. the address of the first byte of the .text section, if present; // 5. the address of the first byte of the .text section, if present;
// 6. the address 0. // 6. the address 0.
template <class ELFT> uint64_t Writer<ELFT>::getEntryAddr() { static uint64_t getEntryAddr() {
// Case 1, 2 or 3 // Case 1, 2 or 3
if (Symbol *B = Symtab->find(Config->Entry)) if (Symbol *B = Symtab->find(Config->Entry))
return B->getVA(); return B->getVA();