diff options
| author | Rui Ueyama <ruiu@google.com> | 2017-03-01 22:02:17 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2017-03-01 22:02:17 +0000 |
| commit | 475b1ddfe2f1bdc9a5b955205980fe016792a71c (patch) | |
| tree | 7df883fde4e5128ac55e4e0e7c01e77559a35243 | |
| parent | d94189dc509e43bca20d0ca7fa18defbe07a082f (diff) | |
| download | bcm5719-llvm-475b1ddfe2f1bdc9a5b955205980fe016792a71c.tar.gz bcm5719-llvm-475b1ddfe2f1bdc9a5b955205980fe016792a71c.zip | |
Inline a function that is too short to be an independent function.
llvm-svn: 296686
| -rw-r--r-- | lld/ELF/SyntheticSections.cpp | 17 | ||||
| -rw-r--r-- | lld/ELF/SyntheticSections.h | 3 |
2 files changed, 8 insertions, 12 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index e9516759458..c8f8d7496ee 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -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 diff --git a/lld/ELF/SyntheticSections.h b/lld/ELF/SyntheticSections.h index a6b794bcfdd..c874c0e256d 100644 --- a/lld/ELF/SyntheticSections.h +++ b/lld/ELF/SyntheticSections.h @@ -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; |

