Inline a function that is too short to be an independent function.

llvm-svn: 296686
This commit is contained in:
Rui Ueyama 2017-03-01 22:02:17 +00:00
parent d94189dc50
commit 475b1ddfe2
2 changed files with 8 additions and 12 deletions

View File

@ -1692,13 +1692,6 @@ GdbIndexSection<ELFT>::GdbIndexSection()
: SyntheticSection(0, SHT_PROGBITS, 1, ".gdb_index"),
StringPool(llvm::StringTableBuilder::ELF) {}
template <class ELFT> void GdbIndexSection<ELFT>::parseDebugSections() {
for (InputSectionBase *S : InputSections)
if (InputSection *IS = dyn_cast<InputSection>(S))
if (IS->OutSec && IS->Name == ".debug_info")
readDwarf(IS);
}
// Iterative hash function for symbol's name is described in .gdb_index format
// specification. Note that we use one for version 5 to 7 here, it is different
// for version 4.
@ -1709,8 +1702,8 @@ static uint32_t hash(StringRef Str) {
return R;
}
template <class ELFT> void GdbIndexSection<ELFT>::readDwarf(InputSection *I) {
GdbIndexBuilder<ELFT> Builder(I);
template <class ELFT> void GdbIndexSection<ELFT>::readDwarf(InputSection *Sec) {
GdbIndexBuilder<ELFT> Builder(Sec);
if (ErrorCount)
return;
@ -1748,7 +1741,11 @@ template <class ELFT> void GdbIndexSection<ELFT>::finalizeContents() {
return;
Finalized = true;
parseDebugSections();
for (InputSectionBase *S : InputSections)
if (InputSection *IS = dyn_cast<InputSection>(S))
if (IS->OutSec && IS->Name == ".debug_info")
readDwarf(IS);
SymbolTable.finalizeContents();
// GdbIndex header consist from version fields

View File

@ -524,8 +524,7 @@ public:
std::vector<AddressEntry<ELFT>> AddressArea;
private:
void parseDebugSections();
void readDwarf(InputSection *I);
void readDwarf(InputSection *Sec);
uint32_t CuTypesOffset;
uint32_t SymTabOffset;