From: Chandler Carruth Date: Fri, 16 Dec 2011 09:36:16 +0000 (+0000) Subject: Make GCC happy by using makeAraryRef instead of the implicit conversion. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a602aec8696708d46d57a74546fa5996c51abd5b;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146732 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/VariadicFunction.h b/include/llvm/ADT/VariadicFunction.h index 08c9697ffc1..00ae347dc73 100644 --- a/include/llvm/ADT/VariadicFunction.h +++ b/include/llvm/ADT/VariadicFunction.h @@ -114,7 +114,7 @@ class VariadicFunction { #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 @@ class VariadicFunction1 { #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 @@ class VariadicFunction2 { 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 @@ class VariadicFunction3 { 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)