From 1b3ee750779d2cb66cce567036f3f3bc355927c9 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. llvm-svn: 135391 --- llvm/include/llvm/ADT/ArrayRef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/include/llvm/ADT/ArrayRef.h b/llvm/include/llvm/ADT/ArrayRef.h index 8eb715546e53..a073f06af4d1 100644 --- a/llvm/include/llvm/ADT/ArrayRef.h +++ b/llvm/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); } /// @} -- GitLab