1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[mlir][NFC] Remove the STLExtras.h header file now that it has been merged into LLVM.

Now that no more utilities exist within, this file can be deleted.

Differential Revision: https://reviews.llvm.org/D78079
This commit is contained in:
River Riddle 2020-04-14 14:54:15 -07:00
parent 15f9d94f49
commit 476a701bb9

View File

@ -33,9 +33,6 @@ template <typename CallableT> struct CheckFunctionTraits {
using FuncType = bool (*)(const int &); using FuncType = bool (*)(const int &);
struct CheckFunctionPointer : CheckFunctionTraits<FuncType> {}; struct CheckFunctionPointer : CheckFunctionTraits<FuncType> {};
static bool func(const int &v);
struct CheckFunctionPointer2 : CheckFunctionTraits<decltype(&func)> {};
/// Test method pointers. /// Test method pointers.
struct Foo { struct Foo {
bool func(const int &v); bool func(const int &v);
@ -43,7 +40,9 @@ struct Foo {
struct CheckMethodPointer : CheckFunctionTraits<decltype(&Foo::func)> {}; struct CheckMethodPointer : CheckFunctionTraits<decltype(&Foo::func)> {};
/// Test lambda references. /// Test lambda references.
auto lambdaFunc = [](const int &v) -> bool { return true; }; LLVM_ATTRIBUTE_UNUSED auto lambdaFunc = [](const int &v) -> bool {
return true;
};
struct CheckLambda : CheckFunctionTraits<decltype(lambdaFunc)> {}; struct CheckLambda : CheckFunctionTraits<decltype(lambdaFunc)> {};
} // end anonymous namespace } // end anonymous namespace
@ -70,7 +69,7 @@ static_assert(!is_detected<has_foo_method_t, NoFooMethod>::value,
// is_invocable // is_invocable
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
static void invocable_fn(int) {} void invocable_fn(int);
static_assert(is_invocable<decltype(invocable_fn), int>::value, static_assert(is_invocable<decltype(invocable_fn), int>::value,
"expected function to be invocable"); "expected function to be invocable");