From e63838dc81cec393988bb5d026dbcc2c239d3961 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Wed, 10 Sep 2014 13:01:03 +0000 Subject: [PATCH] Attempt to pacify buildbots. llvm-svn: 217499 --- include/llvm/Object/COFF.h | 9 ++++++++- lib/Object/COFFObjectFile.cpp | 11 ----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/include/llvm/Object/COFF.h b/include/llvm/Object/COFF.h index 3c619851894..51706b4a180 100644 --- a/include/llvm/Object/COFF.h +++ b/include/llvm/Object/COFF.h @@ -567,7 +567,14 @@ public: const data_directory *&Res) const; std::error_code getSection(int32_t index, const coff_section *&Res) const; template - std::error_code getSymbol(uint32_t index, const coff_symbol_type *&Res) const; + std::error_code getSymbol(uint32_t Index, + const coff_symbol_type *&Res) const { + if (Index < getNumberOfSymbols()) + Res = reinterpret_cast(getSymbolTable()) + Index; + else + return object_error::parse_failed; + return object_error::success; + } ErrorOr getSymbol(uint32_t index) const { if (SymbolTable16) { const coff_symbol16 *Symb = nullptr; diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp index ea134b2499e..cf8ff3193c4 100644 --- a/lib/Object/COFFObjectFile.cpp +++ b/lib/Object/COFFObjectFile.cpp @@ -768,17 +768,6 @@ std::error_code COFFObjectFile::getString(uint32_t Offset, return object_error::success; } -template -std::error_code -COFFObjectFile::getSymbol(uint32_t Index, - const coff_symbol_type *&Result) const { - if (Index < getNumberOfSymbols()) - Result = reinterpret_cast(getSymbolTable()) + Index; - else - return object_error::parse_failed; - return object_error::success; -} - std::error_code COFFObjectFile::getSymbolName(COFFSymbolRef Symbol, StringRef &Res) const { // Check for string table entry. First 4 bytes are 0.