diff options
author | Reid Kleckner <rnk@google.com> | 2017-07-27 18:25:59 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-07-27 18:25:59 +0000 |
commit | eacdf04fdda7c6156b4e063cfce28f643493f76e (patch) | |
tree | 9cb8acc5960748191701aeeaa8bdc391a36756c5 /lld/COFF/Symbols.h | |
parent | ac84850ea620df7f799c38f5a4f2c788eabbea78 (diff) | |
download | llvm-eacdf04fdda7c6156b4e063cfce28f643493f76e.tar.gz |
[PDB] Write public symbol records and the publics hash table
Summary:
MSVC link.exe records all external symbol names in the publics stream.
It provides similar functionality to an ELF .symtab.
Reviewers: zturner, ruiu
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D35871
llvm-svn: 309303
Diffstat (limited to 'lld/COFF/Symbols.h')
-rw-r--r-- | lld/COFF/Symbols.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lld/COFF/Symbols.h b/lld/COFF/Symbols.h index a10b20bf6e13..0d460d73873f 100644 --- a/lld/COFF/Symbols.h +++ b/lld/COFF/Symbols.h @@ -70,6 +70,10 @@ public: // Returns the file from which this symbol was created. InputFile *getFile(); + // Indicates that this symbol will be included in the final image. Only valid + // after calling markLive. + bool isLive() const; + Symbol *symbol(); const Symbol *symbol() const { return const_cast<SymbolBody *>(this)->symbol(); @@ -155,10 +159,10 @@ public: return S->kind() == DefinedRegularKind; } - uint64_t getRVA() { return (*Data)->getRVA() + Sym->Value; } - bool isCOMDAT() { return IsCOMDAT; } - SectionChunk *getChunk() { return *Data; } - uint32_t getValue() { return Sym->Value; } + uint64_t getRVA() const { return (*Data)->getRVA() + Sym->Value; } + bool isCOMDAT() const { return IsCOMDAT; } + SectionChunk *getChunk() const { return *Data; } + uint32_t getValue() const { return Sym->Value; } private: SectionChunk **Data; |