[llvm] r351954 - Re-land rL322538 "Add a value_type to ArrayRef."

Clement Courbet via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 25 07:24:29 PST 2019


Hi Yvan,

I'll revert it, it looks like this is the culprit change indeed, but I'm
surprised this completely static change can make a difference. The only
thing I can see happening is some SFINAE code selecting another function
because value_type was added to ArrayRef. Unfortunately I don't have a
machine to debug this...

On Fri, Jan 25, 2019 at 4:10 PM Yvan Roux <yvan.roux at linaro.org> wrote:

> Hi Clement,
>
> This change broke ARMv7 and ARMv8 selfhosted bots, where second stage
> build fail with an LLVM out of memory error.
>
> logs of the first failure on ARMv8 are available here:
>
> http://lab.llvm.org:8011/builders/clang-cmake-armv8-selfhost-neon/builds/2013
>
> Cheers,
> Yvan
>
> On Wed, 23 Jan 2019 at 15:20, Clement Courbet via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> >
> > Author: courbet
> > Date: Wed Jan 23 06:20:59 2019
> > New Revision: 351954
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=351954&view=rev
> > Log:
> > Re-land rL322538 "Add a value_type to ArrayRef."
> >
> > Modified:
> >     llvm/trunk/include/llvm/ADT/ArrayRef.h
> >     llvm/trunk/unittests/ADT/ArrayRefTest.cpp
> >
> > Modified: llvm/trunk/include/llvm/ADT/ArrayRef.h
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ArrayRef.h?rev=351954&r1=351953&r2=351954&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/include/llvm/ADT/ArrayRef.h (original)
> > +++ llvm/trunk/include/llvm/ADT/ArrayRef.h Wed Jan 23 06:20:59 2019
> > @@ -44,6 +44,7 @@ namespace llvm {
> >      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.
> >
> > Modified: llvm/trunk/unittests/ADT/ArrayRefTest.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/ArrayRefTest.cpp?rev=351954&r1=351953&r2=351954&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/unittests/ADT/ArrayRefTest.cpp (original)
> > +++ llvm/trunk/unittests/ADT/ArrayRefTest.cpp Wed Jan 23 06:20:59 2019
> > @@ -51,6 +51,14 @@ static_assert(
> >      "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) {
> >
> >
> > _______________________________________________
> > 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/20190125/a42748a9/attachment.html>


More information about the llvm-commits mailing list