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
This commit is contained in:
Chandler Carruth 2011-12-16 09:36:16 +00:00
parent d916ce3c8e
commit a602aec869

View File

@ -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)