aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Support/InstVisitor.h3
-rw-r--r--llvm/lib/Analysis/InstCount.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/include/llvm/Support/InstVisitor.h b/llvm/include/llvm/Support/InstVisitor.h
index a9b3b71..6eef0f9 100644
--- a/llvm/include/llvm/Support/InstVisitor.h
+++ b/llvm/include/llvm/Support/InstVisitor.h
@@ -70,12 +70,13 @@ class AllocationInst;
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) {
diff --git a/llvm/lib/Analysis/InstCount.cpp b/llvm/lib/Analysis/InstCount.cpp
index 96c255b..12d16b0 100644
--- a/llvm/lib/Analysis/InstCount.cpp
+++ b/llvm/lib/Analysis/InstCount.cpp
@@ -29,7 +29,7 @@ namespace {
#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; }