From 7c136c3f8b7af841794f30eaaa4822b65f1eb4f7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 4 Aug 2004 04:45:29 +0000 Subject: Minor efficiency improvements git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15461 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/PatternMatch.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/llvm/Support/PatternMatch.h') diff --git a/include/llvm/Support/PatternMatch.h b/include/llvm/Support/PatternMatch.h index 04ebe2c907..5a1df2a7a3 100644 --- a/include/llvm/Support/PatternMatch.h +++ b/include/llvm/Support/PatternMatch.h @@ -36,8 +36,8 @@ namespace llvm { namespace PatternMatch { template -bool match(Val *V, Pattern P) { - return P.match(V); +bool match(Val *V, const Pattern &P) { + return const_cast(P).match(V); } template @@ -52,7 +52,7 @@ inline leaf_ty m_ConstantInt() { return leaf_ty(); } template struct bind_ty { Class *&VR; - bind_ty(Class*& V) :VR(V) {} + bind_ty(Class *&V) : VR(V) {} template bool match(ITy *V) { -- cgit v1.2.3