[llvm] r217499 - Attempt to pacify buildbots.
David Majnemer
david.majnemer at gmail.com
Thu Sep 11 16:52:10 PDT 2014
Sure, r217648.
On Wed, Sep 10, 2014 at 12:17 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
>
> On Wed, Sep 10, 2014 at 6:01 AM, David Majnemer <david.majnemer at gmail.com>
> wrote:
>
>> 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;
>>
>
> Might this be better phrased as either:
>
> if (...) {
> Res = ...
> return success;
> }
> return parse_failed
>
> or possibly:
>
> if (Index >= getNumberOfSymbols())
> return parse_failed;
> Res = ...
> return 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.
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140911/0f6fc81e/attachment.html>
More information about the llvm-commits
mailing list