mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 18:31:23 +00:00
add a new m_Specific pattern that matches only if we have a specific Value*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59393 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
321e6a6e82
commit
a236c89ee3
@ -100,6 +100,21 @@ inline bind_ty<Value> m_Value(Value *&V) { return V; }
|
||||
|
||||
/// m_ConstantInt - Match a ConstantInt, capturing the value if we match.
|
||||
inline bind_ty<ConstantInt> m_ConstantInt(ConstantInt *&CI) { return CI; }
|
||||
|
||||
/// specificval_ty - Match a specified Value*.
|
||||
struct specificval_ty {
|
||||
const Value *Val;
|
||||
specificval_ty(const Value *V) : Val(V) {}
|
||||
|
||||
template<typename ITy>
|
||||
bool match(ITy *V) {
|
||||
return V == Val;
|
||||
}
|
||||
};
|
||||
|
||||
/// m_Specific - Match if we have a specific specified value.
|
||||
inline specificval_ty m_Specific(const Value *V) { return V; }
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Matchers for specific binary operators.
|
||||
|
Loading…
Reference in New Issue
Block a user