From: David Majnemer Date: Wed, 10 Sep 2014 13:01:03 +0000 (+0000) Subject: Attempt to pacify buildbots. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8c6dda0b7d7b79aef402a77c75cf24017e56c33b;p=oota-llvm.git Attempt to pacify buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217499 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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.