[llvm] r217499 - Attempt to pacify buildbots.
David Majnemer
david.majnemer at gmail.com
Wed Sep 10 06:01:03 PDT 2014
Author: majnemer
Date: Wed Sep 10 08:01:03 2014
New Revision: 217499
URL: http://llvm.org/viewvc/llvm-project?rev=217499&view=rev
Log:
Attempt to pacify buildbots.
Modified:
llvm/trunk/include/llvm/Object/COFF.h
llvm/trunk/lib/Object/COFFObjectFile.cpp
Modified: llvm/trunk/include/llvm/Object/COFF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/COFF.h?rev=217499&r1=217498&r2=217499&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/COFF.h (original)
+++ llvm/trunk/include/llvm/Object/COFF.h Wed Sep 10 08:01:03 2014
@@ -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;
Modified: llvm/trunk/lib/Object/COFFObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/COFFObjectFile.cpp?rev=217499&r1=217498&r2=217499&view=diff
==============================================================================
--- llvm/trunk/lib/Object/COFFObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/COFFObjectFile.cpp Wed Sep 10 08:01:03 2014
@@ -768,17 +768,6 @@ std::error_code COFFObjectFile::getStrin
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.
More information about the llvm-commits
mailing list