From 1fca5ff62bb2ecb5bfc8974f4dbfc56e9d3ca721 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 27 Oct 2004 16:14:51 +0000 Subject: Convert 'struct' to 'class' in various places to adhere to the coding standards and work better with VC++. Patch contributed by Morten Ofstad! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17281 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/InstCount.cpp | 2 +- lib/Transforms/Scalar/IndVarSimplify.cpp | 2 +- lib/Transforms/Scalar/SCCP.cpp | 2 +- lib/Transforms/TransformInternals.h | 3 ++- lib/VMCore/ConstantFold.h | 2 +- lib/VMCore/ConstantFolding.h | 2 +- lib/VMCore/PassManagerT.h | 9 ++++++--- 7 files changed, 13 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/Analysis/InstCount.cpp b/lib/Analysis/InstCount.cpp index 12d16b081e..96c255ba31 100644 --- a/lib/Analysis/InstCount.cpp +++ b/lib/Analysis/InstCount.cpp @@ -29,7 +29,7 @@ namespace { #include "llvm/Instruction.def" class InstCount : public FunctionPass, public InstVisitor { - friend class InstVisitor; + friend struct InstVisitor; void visitFunction (Function &F) { ++TotalFuncs; } void visitBasicBlock(BasicBlock &BB) { ++TotalBlocks; } diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 00249807ca..7ad8ef403c 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -66,7 +66,7 @@ namespace { Instruction *InsertPt; - friend class SCEVVisitor; + friend struct SCEVVisitor; public: SCEVExpander(ScalarEvolution &se, LoopInfo &li) : SE(se), LI(li) {} diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index aa57159b6e..82d00b472a 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -135,7 +135,7 @@ public: // The implementation of this class // private: - friend class InstVisitor; // Allow callbacks from visitor + friend struct InstVisitor; // Allow callbacks from visitor // markConstant - Make a value be marked as "constant". If the value // is not already a constant, add it to the instruction work list so that diff --git a/lib/Transforms/TransformInternals.h b/lib/Transforms/TransformInternals.h index 3b80146a27..b5747c9130 100644 --- a/lib/Transforms/TransformInternals.h +++ b/lib/Transforms/TransformInternals.h @@ -90,7 +90,8 @@ public: typedef std::map ValueTypeCache; -struct ValueMapCache { +class ValueMapCache { +public: // Operands mapped - Contains an entry if the first value (the user) has had // the second value (the operand) mapped already. // diff --git a/lib/VMCore/ConstantFold.h b/lib/VMCore/ConstantFold.h index 676b4b8cd8..84e358c5df 100644 --- a/lib/VMCore/ConstantFold.h +++ b/lib/VMCore/ConstantFold.h @@ -24,7 +24,7 @@ namespace llvm { class Value; class Constant; - struct Type; + class Type; // Constant fold various types of instruction... Constant *ConstantFoldCastInstruction(const Constant *V, const Type *DestTy); diff --git a/lib/VMCore/ConstantFolding.h b/lib/VMCore/ConstantFolding.h index 676b4b8cd8..84e358c5df 100644 --- a/lib/VMCore/ConstantFolding.h +++ b/lib/VMCore/ConstantFolding.h @@ -24,7 +24,7 @@ namespace llvm { class Value; class Constant; - struct Type; + class Type; // Constant fold various types of instruction... Constant *ConstantFoldCastInstruction(const Constant *V, const Type *DestTy); diff --git a/lib/VMCore/PassManagerT.h b/lib/VMCore/PassManagerT.h index 1d8267fe4e..8de22d43cc 100644 --- a/lib/VMCore/PassManagerT.h +++ b/lib/VMCore/PassManagerT.h @@ -630,7 +630,8 @@ public: // This pass manager is used to group together all of the BasicBlockPass's // into a single unit. // -template<> struct PassManagerTraits : public BasicBlockPass { +template<> class PassManagerTraits : public BasicBlockPass { +public: // PassClass - The type of passes tracked by this PassManager typedef BasicBlockPass PassClass; @@ -683,7 +684,8 @@ template<> struct PassManagerTraits : public BasicBlockPass { // This pass manager is used to group together all of the FunctionPass's // into a single unit. // -template<> struct PassManagerTraits : public FunctionPass { +template<> class PassManagerTraits : public FunctionPass { +public: // PassClass - The type of passes tracked by this PassManager typedef FunctionPass PassClass; @@ -726,7 +728,8 @@ template<> struct PassManagerTraits : public FunctionPass { // // This is the top level PassManager implementation that holds generic passes. // -template<> struct PassManagerTraits : public ModulePass { +template<> class PassManagerTraits : public ModulePass { +public: // PassClass - The type of passes tracked by this PassManager typedef ModulePass PassClass; -- cgit v1.2.3