[PATCH] D41666: Add a value_type to ArrayRef.

Yvan Roux via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 23:38:06 PST 2018


On 18 January 2018 at 08:25, Clement Courbet <courbet at google.com> wrote:
> Hi Yvan,
>
> Thanks for the heads up. I'll revert the commit.

Thanks Clement

> On Thu, Jan 18, 2018 at 8:23 AM, Yvan Roux via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>>
>> Hi Clement,
>>
>> On 16 January 2018 at 10:12, Clement Courbet via Phabricator via
>> llvm-commits <llvm-commits at lists.llvm.org> wrote:
>> > This revision was automatically updated to reflect the committed
>> > changes.
>> > Closed by commit rL322538: Add a value_type to ArrayRef. (authored by
>> > courbet, committed by ).
>> >
>> > Repository:
>> >   rL LLVM
>> >
>> > https://reviews.llvm.org/D41666
>> >
>> > Files:
>> >   llvm/trunk/include/llvm/ADT/ArrayRef.h
>> >   llvm/trunk/unittests/ADT/ArrayRefTest.cpp
>>
>> Bisecting shows that this patch broke ARM self hosted bots.  Clang now
>> eats all the memory in stage2 builds on ARM boxes (bots run with -j4
>> but I reproduced the issue running one command at a time).  I don't
>> get what is wrong with your patch but hope it is clearer for you !
>>
>> logs are available here:
>>
>> http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-selfhost-neon/builds/2750/steps/build%20stage%202/logs/stdio
>>
>> Cheers,
>> Yvan
>>
>> > Index: llvm/trunk/unittests/ADT/ArrayRefTest.cpp
>> > ===================================================================
>> > --- llvm/trunk/unittests/ADT/ArrayRefTest.cpp
>> > +++ llvm/trunk/unittests/ADT/ArrayRefTest.cpp
>> > @@ -52,6 +52,14 @@
>> >      "Assigning from an initializer list");
>> >  #endif
>> >
>> > +// Check Typedefs.
>> > +static_assert(
>> > +    std::is_same<ArrayRef<int>::value_type, int>::value,
>> > +    "erroneous value_type");
>> > +static_assert(
>> > +    std::is_same<ArrayRef<const int>::value_type, int>::value,
>> > +    "erroneous value_type");
>> > +
>> >  namespace {
>> >
>> >  TEST(ArrayRefTest, AllocatorCopy) {
>> > Index: llvm/trunk/include/llvm/ADT/ArrayRef.h
>> > ===================================================================
>> > --- llvm/trunk/include/llvm/ADT/ArrayRef.h
>> > +++ llvm/trunk/include/llvm/ADT/ArrayRef.h
>> > @@ -45,6 +45,7 @@
>> >      using const_iterator = const T *;
>> >      using size_type = size_t;
>> >      using reverse_iterator = std::reverse_iterator<iterator>;
>> > +    using value_type = typename std::remove_cv<T>::type;
>> >
>> >    private:
>> >      /// The start of the array, in an external buffer.
>> >
>> >
>> >
>> > _______________________________________________
>> > llvm-commits mailing list
>> > llvm-commits at lists.llvm.org
>> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>> >
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>


More information about the llvm-commits mailing list