diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:05:49 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:05:49 +0000 |
commit | e2fd426bdafe9f5c10066d3926ece6e342184a67 (patch) | |
tree | bfbbb5fd38554e6b8988b7a217e9fd0623728d7d /COFF/Symbols.cpp | |
parent | 84c4061b34e048f47e5eb4fbabc1558495e8157c (diff) |
Notes
Diffstat (limited to 'COFF/Symbols.cpp')
-rw-r--r-- | COFF/Symbols.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/COFF/Symbols.cpp b/COFF/Symbols.cpp index 7c8b7d5e8fc55..ccaf86417f10c 100644 --- a/COFF/Symbols.cpp +++ b/COFF/Symbols.cpp @@ -54,7 +54,7 @@ InputFile *Symbol::getFile() { bool Symbol::isLive() const { if (auto *R = dyn_cast<DefinedRegular>(this)) - return R->getChunk()->isLive(); + return R->getChunk()->Live; if (auto *Imp = dyn_cast<DefinedImportData>(this)) return Imp->File->Live; if (auto *Imp = dyn_cast<DefinedImportThunk>(this)) @@ -63,6 +63,13 @@ bool Symbol::isLive() const { return true; } +// MinGW specific. +void Symbol::replaceKeepingName(Symbol *Other, size_t Size) { + StringRef OrigName = Name; + memcpy(this, Other, Size); + Name = OrigName; +} + COFFSymbolRef DefinedCOFF::getCOFFSymbol() { size_t SymSize = cast<ObjFile>(File)->getCOFFObj()->getSymbolTableEntrySize(); if (SymSize == sizeof(coff_symbol16)) |