diff options
Diffstat (limited to 'ELF/InputFiles.h')
-rw-r--r-- | ELF/InputFiles.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ELF/InputFiles.h b/ELF/InputFiles.h index 0db3203b0ba2..5094ddd804a5 100644 --- a/ELF/InputFiles.h +++ b/ELF/InputFiles.h @@ -50,7 +50,7 @@ class Symbol; // If -reproduce option is given, all input files are written // to this tar archive. -extern llvm::TarWriter *Tar; +extern std::unique_ptr<llvm::TarWriter> Tar; // Opens a given file. llvm::Optional<MemoryBufferRef> readFile(StringRef Path); @@ -86,7 +86,9 @@ public: // Returns object file symbols. It is a runtime error to call this // function on files of other types. - ArrayRef<Symbol *> getSymbols() { + ArrayRef<Symbol *> getSymbols() { return getMutableSymbols(); } + + std::vector<Symbol *> &getMutableSymbols() { assert(FileKind == BinaryKind || FileKind == ObjKind || FileKind == BitcodeKind); return Symbols; @@ -169,6 +171,7 @@ template <class ELFT> class ObjFile : public ELFFileBase<ELFT> { typedef typename ELFT::Sym Elf_Sym; typedef typename ELFT::Shdr Elf_Shdr; typedef typename ELFT::Word Elf_Word; + typedef typename ELFT::CGProfile Elf_CGProfile; StringRef getShtGroupSignature(ArrayRef<Elf_Shdr> Sections, const Elf_Shdr &Sec); @@ -218,6 +221,9 @@ public: // Pointer to this input file's .llvm_addrsig section, if it has one. const Elf_Shdr *AddrsigSec = nullptr; + // SHT_LLVM_CALL_GRAPH_PROFILE table + ArrayRef<Elf_CGProfile> CGProfile; + private: void initializeSections(llvm::DenseSet<llvm::CachedHashStringRef> &ComdatGroups); @@ -272,8 +278,6 @@ public: bool AddedToLink = false; private: - template <class ELFT> void addElfSymbols(); - uint64_t OffsetInArchive; }; |