From: Frits van Bommel Date: Mon, 18 Jul 2011 12:31:03 +0000 (+0000) Subject: Hopefully fix some GCC-based buildbots. GCC apparently decays the array to a pointer... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=b80e3477d144a42b764e32f61ede4f842ca47151;p=oota-llvm.git Hopefully fix some GCC-based buildbots. GCC apparently decays the array to a pointer here before overload resolution, so construct with an explicit length instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135391 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/ArrayRef.h b/include/llvm/ADT/ArrayRef.h index 8eb715546e5..a073f06af4d 100644 --- a/include/llvm/ADT/ArrayRef.h +++ b/include/llvm/ADT/ArrayRef.h @@ -190,7 +190,7 @@ namespace llvm { /// Construct an ArrayRef from a C array. template ArrayRef makeArrayRef(const T (&Arr)[N]) { - return Arr; + return ArrayRef(Arr, N); } /// @}