From: Chris Lattner Date: Fri, 10 May 2002 22:21:05 +0000 (+0000) Subject: Make sure to call the derived visit versions from the ranged iterator. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dd63a37c8713902469d5f080380b0cb30373e67d;p=oota-llvm.git Make sure to call the derived visit versions from the ranged iterator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2607 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/InstVisitor.h b/include/llvm/Support/InstVisitor.h index 66992396b14..fdf67319a5c 100644 --- a/include/llvm/Support/InstVisitor.h +++ b/include/llvm/Support/InstVisitor.h @@ -73,7 +73,7 @@ struct InstVisitor { template void visit(Iterator Start, Iterator End) { while (Start != End) - visit(*Start++); + ((SubClass*)this)->visit(*Start++); } // Define visitors for modules, functions and basic blocks...