Standardize on 'class' instead of 'struct'. Gets rid of warnings in VC++
authorReid Spencer <rspencer@reidspencer.com>
Tue, 16 Nov 2004 06:58:55 +0000 (06:58 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Tue, 16 Nov 2004 06:58:55 +0000 (06:58 +0000)
Patch contributed by Jeff Cohen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17889 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/InstVisitor.h
lib/Analysis/InstCount.cpp

index a9b3b7150656c159648d1851d473c8b0ecd16ff1..6eef0f9a1060a7cc00103eecb52457f851a1e271 100644 (file)
@@ -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) {
index 96c255ba31147127a79b88b7b291c186cd93a15f..12d16b081e7b3db6b4b383e92f1e14405c3b054e 100644 (file)
@@ -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; }