[llvm] r325388 - Try to fix broken build with some compilers.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 10:22:07 PST 2018


Sure I'll try to find the buildbot for this one.  In this particular
instance, the error was that HashTableIterator was forward declared but
HashTable had a function declaration where it returned a HashTableIterator
by value, so it was complaining about an incomplete type.  clang-cl and cl
accepted it, so I assume it was either a clang++ specific error or a gcc
specific error.

On Tue, Feb 20, 2018 at 10:19 AM David Blaikie <dblaikie at gmail.com> wrote:

> Could you include a link to the buildbot and/or further descriptions of
> the issue being worked around (as a reply here in this case, though good to
> have it in the commit message for future changes (& if the workaround's
> particularly weird, maybe a comment in the source))
>
> On Fri, Feb 16, 2018 at 1:00 PM Zachary Turner via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: zturner
>> Date: Fri Feb 16 12:58:25 2018
>> New Revision: 325388
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=325388&view=rev
>> Log:
>> Try to fix broken build with some compilers.
>>
>> Modified:
>>     llvm/trunk/include/llvm/DebugInfo/PDB/Native/HashTable.h
>>
>> Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/HashTable.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/HashTable.h?rev=325388&r1=325387&r2=325388&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/include/llvm/DebugInfo/PDB/Native/HashTable.h (original)
>> +++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/HashTable.h Fri Feb 16
>> 12:58:25 2018
>> @@ -26,7 +26,29 @@ class BinaryStreamWriter;
>>
>>  namespace pdb {
>>
>> -class HashTableIterator;
>> +class HashTableIterator
>> +    : public iterator_facade_base<HashTableIterator,
>> std::forward_iterator_tag,
>> +                                  std::pair<uint32_t, uint32_t>> {
>> +  friend class HashTable;
>> +
>> +  HashTableIterator(const HashTable &Map, uint32_t Index, bool IsEnd);
>> +
>> +public:
>> +  HashTableIterator(const HashTable &Map);
>> +
>> +  HashTableIterator &operator=(const HashTableIterator &R);
>> +  bool operator==(const HashTableIterator &R) const;
>> +  const std::pair<uint32_t, uint32_t> &operator*() const;
>> +  HashTableIterator &operator++();
>> +
>> +private:
>> +  bool isEnd() const { return IsEnd; }
>> +  uint32_t index() const { return Index; }
>> +
>> +  const HashTable *Map;
>> +  uint32_t Index;
>> +  bool IsEnd;
>> +};
>>
>>  class HashTable {
>>    friend class HashTableIterator;
>> @@ -189,30 +211,6 @@ private:
>>                                      SparseBitVector<> &Vec);
>>  };
>>
>> -class HashTableIterator
>> -    : public iterator_facade_base<HashTableIterator,
>> std::forward_iterator_tag,
>> -                                  std::pair<uint32_t, uint32_t>> {
>> -  friend class HashTable;
>> -
>> -  HashTableIterator(const HashTable &Map, uint32_t Index, bool IsEnd);
>> -
>> -public:
>> -  HashTableIterator(const HashTable &Map);
>> -
>> -  HashTableIterator &operator=(const HashTableIterator &R);
>> -  bool operator==(const HashTableIterator &R) const;
>> -  const std::pair<uint32_t, uint32_t> &operator*() const;
>> -  HashTableIterator &operator++();
>> -
>> -private:
>> -  bool isEnd() const { return IsEnd; }
>> -  uint32_t index() const { return Index; }
>> -
>> -  const HashTable *Map;
>> -  uint32_t Index;
>> -  bool IsEnd;
>> -};
>> -
>>  } // end namespace pdb
>>
>>  } // end namespace llvm
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180220/c438e493/attachment.html>


More information about the llvm-commits mailing list