1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

Attempt to pacify buildbots.

llvm-svn: 217499
This commit is contained in:
David Majnemer 2014-09-10 13:01:03 +00:00
parent c24289aa47
commit e63838dc81
2 changed files with 8 additions and 12 deletions

View File

@ -567,7 +567,14 @@ public:
const data_directory *&Res) const;
std::error_code getSection(int32_t index, const coff_section *&Res) const;
template <typename coff_symbol_type>
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<coff_symbol_type *>(getSymbolTable()) + Index;
else
return object_error::parse_failed;
return object_error::success;
}
ErrorOr<COFFSymbolRef> getSymbol(uint32_t index) const {
if (SymbolTable16) {
const coff_symbol16 *Symb = nullptr;

View File

@ -768,17 +768,6 @@ std::error_code COFFObjectFile::getString(uint32_t Offset,
return object_error::success;
}
template <typename coff_symbol_type>
std::error_code
COFFObjectFile::getSymbol(uint32_t Index,
const coff_symbol_type *&Result) const {
if (Index < getNumberOfSymbols())
Result = reinterpret_cast<coff_symbol_type *>(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.