aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-27 16:14:51 +0000
committerChris Lattner <sabre@nondot.org>2004-10-27 16:14:51 +0000
commit1fca5ff62bb2ecb5bfc8974f4dbfc56e9d3ca721 (patch)
tree84ba84e29d790774dd87ad9efc8acb702dafc842 /include/llvm/CodeGen
parent3acd9181df5d8f76f75a384266e2a78b9a6c4f45 (diff)
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
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h5
-rw-r--r--include/llvm/CodeGen/MachineCodeEmitter.h3
-rw-r--r--include/llvm/CodeGen/MachineFunction.h2
-rw-r--r--include/llvm/CodeGen/MachineInstr.h6
4 files changed, 9 insertions, 7 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index 62a6e80208..a7d031bad4 100644
--- a/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/include/llvm/CodeGen/MachineBasicBlock.h
@@ -24,7 +24,8 @@ namespace llvm {
// 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 @@ public:
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; }
diff --git a/include/llvm/CodeGen/MachineCodeEmitter.h b/include/llvm/CodeGen/MachineCodeEmitter.h
index 0daab91faf..dc7aa5e09c 100644
--- a/include/llvm/CodeGen/MachineCodeEmitter.h
+++ b/include/llvm/CodeGen/MachineCodeEmitter.h
@@ -29,7 +29,8 @@ class Value;
class GlobalValue;
class Function;
-struct MachineCodeEmitter {
+class MachineCodeEmitter {
+public:
virtual ~MachineCodeEmitter() {}
/// startFunction - This callback is invoked when the specified function is
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index 72feda4eb1..e6d9eb1bf8 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -31,7 +31,7 @@ class MachineConstantPool;
// 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;
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index d9a865e0a6..6227490706 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -29,8 +29,8 @@ class MachineBasicBlock;
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 @@ class MachineInstr {
// Intrusive list support
//
- friend class ilist_traits<MachineInstr>;
+ friend struct ilist_traits<MachineInstr>;
public:
MachineInstr(short Opcode, unsigned numOperands);