From f5e3cfe6d6f00192c056f13c0a0ada8f98a0611f Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Tue, 16 Nov 2004 06:58:55 +0000 Subject: [PATCH] Standardize on 'class' instead of 'struct'. Gets rid of warnings in VC++ Patch contributed by Jeff Cohen. llvm-svn: 17889 --- llvm/include/llvm/Support/InstVisitor.h | 3 ++- llvm/lib/Analysis/InstCount.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/Support/InstVisitor.h b/llvm/include/llvm/Support/InstVisitor.h index a9b3b7150656..6eef0f9a1060 100644 --- a/llvm/include/llvm/Support/InstVisitor.h +++ b/llvm/include/llvm/Support/InstVisitor.h @@ -70,12 +70,13 @@ class AllocationInst; template -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 void visit(Iterator Start, Iterator End) { diff --git a/llvm/lib/Analysis/InstCount.cpp b/llvm/lib/Analysis/InstCount.cpp index 96c255ba3114..12d16b081e7b 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 { - friend struct InstVisitor; + friend class InstVisitor; void visitFunction (Function &F) { ++TotalFuncs; } void visitBasicBlock(BasicBlock &BB) { ++TotalBlocks; }