Patch contributed by Jeff Cohen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17889
91177308-0d34-0410-b5e6-
96231b3b80d8
template<typename SubClass, typename RetTy=void>
-struct InstVisitor {
+class InstVisitor {
//===--------------------------------------------------------------------===//
// Interface code - This is the public interface of the InstVisitor that you
// use to visit instructions...
//
+public:
// Generic visit method - Allow visitation to all instructions in a range
template<class Iterator>
void visit(Iterator Start, Iterator End) {
#include "llvm/Instruction.def"
class InstCount : public FunctionPass, public InstVisitor<InstCount> {
- friend struct InstVisitor<InstCount>;
+ friend class InstVisitor<InstCount>;
void visitFunction (Function &F) { ++TotalFuncs; }
void visitBasicBlock(BasicBlock &BB) { ++TotalBlocks; }