diff options
| author | Sam Clegg <sbc@chromium.org> | 2018-01-10 00:52:20 +0000 |
|---|---|---|
| committer | Sam Clegg <sbc@chromium.org> | 2018-01-10 00:52:20 +0000 |
| commit | 20db381b9056651dee80dd85c7a75894bb6bf31d (patch) | |
| tree | ee987b1c15e0131cd4514e14346e12bb4239bae8 /lld/wasm/SymbolTable.h | |
| parent | 04576cc060bf33c7503ba7cb3d4182b79bcc2c46 (diff) | |
| download | bcm5719-llvm-20db381b9056651dee80dd85c7a75894bb6bf31d.tar.gz bcm5719-llvm-20db381b9056651dee80dd85c7a75894bb6bf31d.zip | |
[WebAssembly] Refactor symbol and symbol table to remove WasmSymbol references
This WasmSymbol types comes directly from the input objects
but we want to be able to represent synthetic symbols too.
This is more in line with how the ELF linker represents symbols.
This change also removes the logic from Symbol::getVirtualAddress
for finding the global address and instead has the InputFile
provide this.
Differential Revision: https://reviews.llvm.org/D41426
llvm-svn: 322145
Diffstat (limited to 'lld/wasm/SymbolTable.h')
| -rw-r--r-- | lld/wasm/SymbolTable.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lld/wasm/SymbolTable.h b/lld/wasm/SymbolTable.h index 037fea9b67d..1a1a1d6da29 100644 --- a/lld/wasm/SymbolTable.h +++ b/lld/wasm/SymbolTable.h @@ -17,7 +17,6 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/Support/raw_ostream.h" -using llvm::object::WasmSymbol; using llvm::wasm::WasmSignature; namespace lld { @@ -49,11 +48,11 @@ public: ArrayRef<Symbol *> getSymbols() const { return SymVector; } Symbol *find(StringRef Name); - Symbol *addDefined(InputFile *F, const WasmSymbol *Sym, - const InputSegment *Segment = nullptr, - InputFunction *Function = nullptr); - Symbol *addUndefined(InputFile *F, const WasmSymbol *Sym, - const WasmSignature *Signature = nullptr); + Symbol *addDefined(StringRef Name, Symbol::Kind Kind, uint32_t Flags, + InputFile *F, const InputSegment *Segment = nullptr, + InputFunction *Function = nullptr, uint32_t Address = 0); + Symbol *addUndefined(StringRef Name, Symbol::Kind Kind, uint32_t Flags, + InputFile *F, const WasmSignature *Signature = nullptr); Symbol *addUndefinedFunction(StringRef Name, const WasmSignature *Type); Symbol *addDefinedGlobal(StringRef Name); void addLazy(ArchiveFile *F, const Archive::Symbol *Sym); |

