[llvm-commits] CVS: llvm/include/llvm/AbstractTypeUser.h BasicBlock.h Instructions.h Pass.h Use.h Value.h
Chris Lattner
lattner at cs.uiuc.edu
Wed Oct 27 09:14:59 PDT 2004
Changes in directory llvm/include/llvm:
AbstractTypeUser.h updated: 1.22 -> 1.23
BasicBlock.h updated: 1.43 -> 1.44
Instructions.h updated: 1.5 -> 1.6
Pass.h updated: 1.46 -> 1.47
Use.h updated: 1.6 -> 1.7
Value.h updated: 1.65 -> 1.66
---
Log message:
Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++. Patch contributed by Morten Ofstad!
---
Diffs of the changes: (+18 -13)
Index: llvm/include/llvm/AbstractTypeUser.h
diff -u llvm/include/llvm/AbstractTypeUser.h:1.22 llvm/include/llvm/AbstractTypeUser.h:1.23
--- llvm/include/llvm/AbstractTypeUser.h:1.22 Tue Aug 3 23:45:42 2004
+++ llvm/include/llvm/AbstractTypeUser.h Wed Oct 27 11:14:47 2004
@@ -39,7 +39,7 @@
namespace llvm {
-struct Type;
+class Type;
class DerivedType;
class AbstractTypeUser {
Index: llvm/include/llvm/BasicBlock.h
diff -u llvm/include/llvm/BasicBlock.h:1.43 llvm/include/llvm/BasicBlock.h:1.44
--- llvm/include/llvm/BasicBlock.h:1.43 Mon Oct 11 17:21:13 2004
+++ llvm/include/llvm/BasicBlock.h Wed Oct 27 11:14:47 2004
@@ -45,7 +45,8 @@
static iplist<Instruction> &getList(BasicBlock *BB);
};
-struct BasicBlock : public Value { // Basic blocks are data objects also
+class BasicBlock : public Value { // Basic blocks are data objects also
+public:
typedef iplist<Instruction> InstListType;
private :
InstListType InstList;
Index: llvm/include/llvm/Instructions.h
diff -u llvm/include/llvm/Instructions.h:1.5 llvm/include/llvm/Instructions.h:1.6
--- llvm/include/llvm/Instructions.h:1.5 Sat Oct 16 13:05:54 2004
+++ llvm/include/llvm/Instructions.h Wed Oct 27 11:14:47 2004
@@ -21,7 +21,7 @@
namespace llvm {
-struct BasicBlock;
+class BasicBlock;
class PointerType;
//===----------------------------------------------------------------------===//
@@ -1159,7 +1159,8 @@
/// UnwindInst - Immediately exit the current function, unwinding the stack
/// until an invoke instruction is found.
///
-struct UnwindInst : public TerminatorInst {
+class UnwindInst : public TerminatorInst {
+public:
UnwindInst(Instruction *InsertBefore = 0)
: TerminatorInst(Instruction::Unwind, InsertBefore) {
}
@@ -1196,7 +1197,8 @@
/// presence of this instruction indicates some higher level knowledge that the
/// end of the block cannot be reached.
///
-struct UnreachableInst : public TerminatorInst {
+class UnreachableInst : public TerminatorInst {
+public:
UnreachableInst(Instruction *InsertBefore = 0)
: TerminatorInst(Instruction::Unreachable, InsertBefore) {
}
Index: llvm/include/llvm/Pass.h
diff -u llvm/include/llvm/Pass.h:1.46 llvm/include/llvm/Pass.h:1.47
--- llvm/include/llvm/Pass.h:1.46 Sun Sep 19 23:42:18 2004
+++ llvm/include/llvm/Pass.h Wed Oct 27 11:14:47 2004
@@ -38,7 +38,7 @@
namespace llvm {
class Value;
-struct BasicBlock;
+class BasicBlock;
class Function;
class Module;
class AnalysisUsage;
@@ -56,7 +56,7 @@
/// constrained passes described below.
///
class Pass {
- friend class AnalysisResolver;
+ friend struct AnalysisResolver;
AnalysisResolver *Resolver; // AnalysisResolver this pass is owned by...
const PassInfo *PassInfoCache;
@@ -211,8 +211,8 @@
/// interprocedural optimizations and analyses. ModulePass's may do anything
/// they want to the program.
///
-struct ModulePass : public Pass {
-
+class ModulePass : public Pass {
+public:
/// runOnModule - Virtual method overriden by subclasses to process the module
/// being operated on.
virtual bool runOnModule(Module &M) = 0;
@@ -228,7 +228,8 @@
/// not need to be run. This is useful for things like target information and
/// "basic" versions of AnalysisGroups.
///
-struct ImmutablePass : public ModulePass {
+class ImmutablePass : public ModulePass {
+public:
/// initializePass - This method may be overriden by immutable passes to allow
/// them to perform various initialization actions they require. This is
/// primarily because an ImmutablePass can "require" another ImmutablePass,
@@ -255,7 +256,8 @@
/// 2. Optimizing a function does not cause the addition or removal of any
/// functions in the module
///
-struct FunctionPass : public ModulePass {
+class FunctionPass : public ModulePass {
+public:
/// doInitialization - Virtual method overridden by subclasses to do
/// any necessary per-module initialization.
///
Index: llvm/include/llvm/Use.h
diff -u llvm/include/llvm/Use.h:1.6 llvm/include/llvm/Use.h:1.7
--- llvm/include/llvm/Use.h:1.6 Wed Sep 1 17:55:34 2004
+++ llvm/include/llvm/Use.h Wed Oct 27 11:14:47 2004
@@ -35,7 +35,7 @@
Value *Val;
User *U;
Use *Prev, *Next;
- friend class ilist_traits<Use>;
+ friend struct ilist_traits<Use>;
public:
inline Use(Value *v, User *user);
inline Use(const Use &u);
Index: llvm/include/llvm/Value.h
diff -u llvm/include/llvm/Value.h:1.65 llvm/include/llvm/Value.h:1.66
--- llvm/include/llvm/Value.h:1.65 Sat Oct 16 13:06:07 2004
+++ llvm/include/llvm/Value.h Wed Oct 27 11:14:47 2004
@@ -27,7 +27,7 @@
class Constant;
class Argument;
class Instruction;
-struct BasicBlock;
+class BasicBlock;
class GlobalValue;
class Function;
class GlobalVariable;
More information about the llvm-commits
mailing list