mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-16 23:19:37 +00:00
Minor efficiency improvements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15461 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
46c2b3a5ec
commit
7c136c3f8b
@ -36,8 +36,8 @@ namespace llvm {
|
||||
namespace PatternMatch {
|
||||
|
||||
template<typename Val, typename Pattern>
|
||||
bool match(Val *V, Pattern P) {
|
||||
return P.match(V);
|
||||
bool match(Val *V, const Pattern &P) {
|
||||
return const_cast<Pattern&>(P).match(V);
|
||||
}
|
||||
|
||||
template<typename Class>
|
||||
@ -52,7 +52,7 @@ inline leaf_ty<ConstantInt> m_ConstantInt() { return leaf_ty<ConstantInt>(); }
|
||||
template<typename Class>
|
||||
struct bind_ty {
|
||||
Class *&VR;
|
||||
bind_ty(Class*& V) :VR(V) {}
|
||||
bind_ty(Class *&V) : VR(V) {}
|
||||
|
||||
template<typename ITy>
|
||||
bool match(ITy *V) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user