mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-03 19:02:35 +00:00
Minor efficiency improvements
llvm-svn: 15461
This commit is contained in:
parent
cccb1332ed
commit
83c911936d
@ -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