forked from OSchip/llvm-project
Add no-trait base OpImpl::Base.
PiperOrigin-RevId: 204915682
This commit is contained in:
parent
fc7d6dbe5e
commit
4293666bf7
|
@ -116,8 +116,11 @@ protected:
|
|||
: state(const_cast<Operation *>(state)) {}
|
||||
|
||||
private:
|
||||
template <typename... Types>
|
||||
struct BaseVerifier;
|
||||
|
||||
template <typename First, typename... Rest>
|
||||
struct BaseVerifier {
|
||||
struct BaseVerifier<First, Rest...> {
|
||||
static const char *verifyBase(const Operation *op) {
|
||||
if (auto error = First::verifyBase(op))
|
||||
return error;
|
||||
|
@ -132,6 +135,13 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct BaseVerifier<> {
|
||||
static const char *verifyBase(const Operation *op) {
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
Operation *state;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue