mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
add a helper for matching "1".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83760 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
78c552ef30
commit
f7a60d28a1
@ -87,6 +87,18 @@ struct zero_ty {
|
||||
/// m_Zero() - Match an arbitrary zero/null constant.
|
||||
inline zero_ty m_Zero() { return zero_ty(); }
|
||||
|
||||
struct one_ty {
|
||||
template<typename ITy>
|
||||
bool match(ITy *V) {
|
||||
if (const ConstantInt *C = dyn_cast<ConstantInt>(V))
|
||||
return C->isOne();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/// m_One() - Match a an integer 1.
|
||||
inline one_ty m_One() { return one_ty(); }
|
||||
|
||||
|
||||
template<typename Class>
|
||||
struct bind_ty {
|
||||
|
Loading…
Reference in New Issue
Block a user