projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46c2b3a
)
Minor efficiency improvements
author
Chris Lattner
<sabre@nondot.org>
Wed, 4 Aug 2004 04:45:29 +0000
(
04:45
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 4 Aug 2004 04:45:29 +0000
(
04:45
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15461
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/PatternMatch.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/PatternMatch.h
b/include/llvm/Support/PatternMatch.h
index 04ebe2c9076b45c1271e749bf99ddfceb09a745a..5a1df2a7a325b93176e7d7a0f1f016c8cbc04b99 100644
(file)
--- a/
include/llvm/Support/PatternMatch.h
+++ b/
include/llvm/Support/PatternMatch.h
@@
-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) {