[llvm-commits] [llvm] r146732 - /llvm/trunk/include/llvm/ADT/VariadicFunction.h

Chandler Carruth chandlerc at gmail.com
Fri Dec 16 01:36:16 PST 2011


Author: chandlerc
Date: Fri Dec 16 03:36:16 2011
New Revision: 146732

URL: http://llvm.org/viewvc/llvm-project?rev=146732&view=rev
Log:
Make GCC happy by using makeAraryRef instead of the implicit conversion.
I have no idea why GCC can't cope with the implicit conversion and Clang
can, or whose bug it is. Grr.

Modified:
    llvm/trunk/include/llvm/ADT/VariadicFunction.h

Modified: llvm/trunk/include/llvm/ADT/VariadicFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/VariadicFunction.h?rev=146732&r1=146731&r2=146732&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/VariadicFunction.h (original)
+++ llvm/trunk/include/llvm/ADT/VariadicFunction.h Fri Dec 16 03:36:16 2011
@@ -114,7 +114,7 @@
 #define LLVM_DEFINE_OVERLOAD(N) \
   ResultT operator()(LLVM_COMMA_JOIN ## N(const ArgT &A)) const { \
     const ArgT *const Args[] = { LLVM_COMMA_JOIN ## N(&A) }; \
-    return Func(Args); \
+    return Func(makeArrayRef(Args)); \
   }
   LLVM_DEFINE_OVERLOAD(1)
   LLVM_DEFINE_OVERLOAD(2)
@@ -164,7 +164,7 @@
 #define LLVM_DEFINE_OVERLOAD(N) \
   ResultT operator()(Param0T P0, LLVM_COMMA_JOIN ## N(const ArgT &A)) const { \
     const ArgT *const Args[] = { LLVM_COMMA_JOIN ## N(&A) }; \
-    return Func(P0, Args); \
+    return Func(P0, makeArrayRef(Args)); \
   }
   LLVM_DEFINE_OVERLOAD(1)
   LLVM_DEFINE_OVERLOAD(2)
@@ -215,7 +215,7 @@
   ResultT operator()(Param0T P0, Param1T P1, \
                      LLVM_COMMA_JOIN ## N(const ArgT &A)) const { \
     const ArgT *const Args[] = { LLVM_COMMA_JOIN ## N(&A) }; \
-    return Func(P0, P1, Args); \
+    return Func(P0, P1, makeAraryRef(Args)); \
   }
   LLVM_DEFINE_OVERLOAD(1)
   LLVM_DEFINE_OVERLOAD(2)
@@ -267,7 +267,7 @@
   ResultT operator()(Param0T P0, Param1T P1, Param2T P2, \
                      LLVM_COMMA_JOIN ## N(const ArgT &A)) const { \
     const ArgT *const Args[] = { LLVM_COMMA_JOIN ## N(&A) }; \
-    return Func(P0, P1, P2, Args); \
+    return Func(P0, P1, P2, makeArrayRef(Args)); \
   }
   LLVM_DEFINE_OVERLOAD(1)
   LLVM_DEFINE_OVERLOAD(2)





More information about the llvm-commits mailing list