From b80e3477d144a42b764e32f61ede4f842ca47151 Mon Sep 17 00:00:00 2001 From: Frits van Bommel Date: Mon, 18 Jul 2011 12:31:03 +0000 Subject: [PATCH] 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 --- include/llvm/ADT/ArrayRef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } /// @} -- 2.34.1