[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineBasicBlock.h MachineCodeEmitter.h MachineFunction.h MachineInstr.h
Chris Lattner
lattner at cs.uiuc.edu
Wed Oct 27 09:15:04 PDT 2004
Changes in directory llvm/include/llvm/CodeGen:
MachineBasicBlock.h updated: 1.40 -> 1.41
MachineCodeEmitter.h updated: 1.18 -> 1.19
MachineFunction.h updated: 1.44 -> 1.45
MachineInstr.h updated: 1.156 -> 1.157
---
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: (+9 -7)
Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h
diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.40 llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.41
--- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.40 Tue Oct 26 10:41:13 2004
+++ llvm/include/llvm/CodeGen/MachineBasicBlock.h Wed Oct 27 11:14:51 2004
@@ -24,7 +24,8 @@
// ilist_traits
template <>
-class ilist_traits<MachineInstr> {
+struct ilist_traits<MachineInstr> {
+protected:
// this is only set by the MachineBasicBlock owning the ilist
friend class MachineBasicBlock;
MachineBasicBlock* parent;
@@ -179,7 +180,7 @@
int getNumber() const { return Number; }
private: // Methods used to maintain doubly linked list of blocks...
- friend class ilist_traits<MachineBasicBlock>;
+ friend struct ilist_traits<MachineBasicBlock>;
MachineBasicBlock *getPrev() const { return Prev; }
MachineBasicBlock *getNext() const { return Next; }
Index: llvm/include/llvm/CodeGen/MachineCodeEmitter.h
diff -u llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.18 llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.19
--- llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.18 Wed Sep 1 17:55:34 2004
+++ llvm/include/llvm/CodeGen/MachineCodeEmitter.h Wed Oct 27 11:14:51 2004
@@ -29,7 +29,8 @@
class GlobalValue;
class Function;
-struct MachineCodeEmitter {
+class MachineCodeEmitter {
+public:
virtual ~MachineCodeEmitter() {}
/// startFunction - This callback is invoked when the specified function is
Index: llvm/include/llvm/CodeGen/MachineFunction.h
diff -u llvm/include/llvm/CodeGen/MachineFunction.h:1.44 llvm/include/llvm/CodeGen/MachineFunction.h:1.45
--- llvm/include/llvm/CodeGen/MachineFunction.h:1.44 Thu Sep 30 16:42:02 2004
+++ llvm/include/llvm/CodeGen/MachineFunction.h Wed Oct 27 11:14:51 2004
@@ -31,7 +31,7 @@
// ilist_traits
template <>
-class ilist_traits<MachineBasicBlock> {
+struct ilist_traits<MachineBasicBlock> {
// this is only set by the MachineFunction owning the ilist
friend class MachineFunction;
MachineFunction* Parent;
Index: llvm/include/llvm/CodeGen/MachineInstr.h
diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.156 llvm/include/llvm/CodeGen/MachineInstr.h:1.157
--- llvm/include/llvm/CodeGen/MachineInstr.h:1.156 Mon Oct 18 12:19:20 2004
+++ llvm/include/llvm/CodeGen/MachineInstr.h Wed Oct 27 11:14:51 2004
@@ -29,8 +29,8 @@
class TargetMachine;
class GlobalValue;
-template <typename T> class ilist_traits;
-template <typename T> class ilist;
+template <typename T> struct ilist_traits;
+template <typename T> struct ilist;
typedef short MachineOpCode;
@@ -417,7 +417,7 @@
// Intrusive list support
//
- friend class ilist_traits<MachineInstr>;
+ friend struct ilist_traits<MachineInstr>;
public:
MachineInstr(short Opcode, unsigned numOperands);
More information about the llvm-commits
mailing list