diff options
-rw-r--r-- | lld/COFF/Symbols.cpp | 26 | ||||
-rw-r--r-- | lld/COFF/Symbols.h | 4 |
2 files changed, 0 insertions, 30 deletions
diff --git a/lld/COFF/Symbols.cpp b/lld/COFF/Symbols.cpp index d732d76cfb0..3d125c92b2a 100644 --- a/lld/COFF/Symbols.cpp +++ b/lld/COFF/Symbols.cpp @@ -162,32 +162,6 @@ std::string SymbolBody::getDebugName() { return N; } -uint64_t Defined::getFileOff() { - switch (kind()) { - case DefinedImportDataKind: - return cast<DefinedImportData>(this)->getFileOff(); - case DefinedImportThunkKind: - return cast<DefinedImportThunk>(this)->getFileOff(); - case DefinedLocalImportKind: - return cast<DefinedLocalImport>(this)->getFileOff(); - case DefinedCommonKind: - return cast<DefinedCommon>(this)->getFileOff(); - case DefinedRegularKind: - return cast<DefinedRegular>(this)->getFileOff(); - - case DefinedBitcodeKind: - llvm_unreachable("There is no file offset for a bitcode symbol."); - case DefinedAbsoluteKind: - llvm_unreachable("Cannot get a file offset for an absolute symbol."); - case DefinedRelativeKind: - llvm_unreachable("Cannot get a file offset for a relative symbol."); - case LazyKind: - case UndefinedKind: - llvm_unreachable("Cannot get a file offset for an undefined symbol."); - } - llvm_unreachable("unknown symbol kind"); -} - COFFSymbolRef DefinedCOFF::getCOFFSymbol() { size_t SymSize = File->getCOFFObj()->getSymbolTableEntrySize(); if (SymSize == sizeof(coff_symbol16)) diff --git a/lld/COFF/Symbols.h b/lld/COFF/Symbols.h index 7059fbc8bb1..f96c1fb3cc1 100644 --- a/lld/COFF/Symbols.h +++ b/lld/COFF/Symbols.h @@ -125,10 +125,6 @@ public: // writer sets and uses RVAs. uint64_t getRVA(); - // Returns the file offset of this symbol in the final executable. - // The writer uses this information to apply relocations. - uint64_t getFileOff(); - // Returns the RVA relative to the beginning of the output section. // Used to implement SECREL relocation type. uint64_t getSecrel(); |