aboutsummaryrefslogtreecommitdiff
path: root/llvm/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-04 04:45:29 +0000
committerChris Lattner <sabre@nondot.org>2004-08-04 04:45:29 +0000
commit949681f5104c93aad948740e4b0fee0ca0e26f47 (patch)
tree652c973610224862d44e873417447d8d9b8e508c /llvm/include
parent3e689f807060dbfcbb25fc999066ae83e28317f4 (diff)
downloadllvm-949681f5104c93aad948740e4b0fee0ca0e26f47.zip
llvm-949681f5104c93aad948740e4b0fee0ca0e26f47.tar.gz
llvm-949681f5104c93aad948740e4b0fee0ca0e26f47.tar.bz2
Minor efficiency improvements
llvm-svn: 15461
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Support/PatternMatch.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/Support/PatternMatch.h b/llvm/include/llvm/Support/PatternMatch.h
index 04ebe2c..5a1df2a 100644
--- a/llvm/include/llvm/Support/PatternMatch.h
+++ b/llvm/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) {