[llvm-commits] CVS: llvm/include/llvm/CodeGen/DwarfWriter.h MachineConstantPool.h MachineJumpTableInfo.h

Owen Anderson resistor at mac.com
Tue May 2 18:30:20 PDT 2006



Changes in directory llvm/include/llvm/CodeGen:

DwarfWriter.h updated: 1.34 -> 1.35
MachineConstantPool.h updated: 1.15 -> 1.16
MachineJumpTableInfo.h updated: 1.2 -> 1.3
---
Log message:

Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses.  This has one caller-visible change: getTargetData() now returns a pointer instead of a reference.

This fixes PR 759: http://llvm.cs.uiuc.edu/PR759 .



---
Diffs of the changes:  (+5 -5)

 DwarfWriter.h          |    2 +-
 MachineConstantPool.h  |    4 ++--
 MachineJumpTableInfo.h |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/include/llvm/CodeGen/DwarfWriter.h
diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.34 llvm/include/llvm/CodeGen/DwarfWriter.h:1.35
--- llvm/include/llvm/CodeGen/DwarfWriter.h:1.34	Fri Apr  7 15:44:42 2006
+++ llvm/include/llvm/CodeGen/DwarfWriter.h	Tue May  2 20:29:56 2006
@@ -85,7 +85,7 @@
   AsmPrinter *Asm;
   
   /// TD - Target data.
-  const TargetData &TD;
+  const TargetData *TD;
   
   /// RI - Register Information.
   const MRegisterInfo *RI;


Index: llvm/include/llvm/CodeGen/MachineConstantPool.h
diff -u llvm/include/llvm/CodeGen/MachineConstantPool.h:1.15 llvm/include/llvm/CodeGen/MachineConstantPool.h:1.16
--- llvm/include/llvm/CodeGen/MachineConstantPool.h:1.15	Tue Apr 18 11:03:18 2006
+++ llvm/include/llvm/CodeGen/MachineConstantPool.h	Tue May  2 20:29:56 2006
@@ -42,11 +42,11 @@
 };
   
 class MachineConstantPool {
-  const TargetData &TD;
+  const TargetData *TD;
   unsigned PoolAlignment;
   std::vector<MachineConstantPoolEntry> Constants;
 public:
-  MachineConstantPool(const TargetData &td) : TD(td), PoolAlignment(1) {}
+  MachineConstantPool(const TargetData *td) : TD(td), PoolAlignment(1) {}
     
   /// getConstantPoolAlignment - Return the log2 of the alignment required by
   /// the whole constant pool, of which the first element must be aligned.


Index: llvm/include/llvm/CodeGen/MachineJumpTableInfo.h
diff -u llvm/include/llvm/CodeGen/MachineJumpTableInfo.h:1.2 llvm/include/llvm/CodeGen/MachineJumpTableInfo.h:1.3
--- llvm/include/llvm/CodeGen/MachineJumpTableInfo.h:1.2	Sat Apr 22 18:52:35 2006
+++ llvm/include/llvm/CodeGen/MachineJumpTableInfo.h	Tue May  2 20:29:56 2006
@@ -37,10 +37,10 @@
 };
   
 class MachineJumpTableInfo {
-  const TargetData &TD;
+  const TargetData *TD;
   std::vector<MachineJumpTableEntry> JumpTables;
 public:
-  MachineJumpTableInfo(const TargetData &td) : TD(td) {}
+  MachineJumpTableInfo(const TargetData *td) : TD(td) {}
     
   /// getJumpTableIndex - Create a new jump table or return an existing one.
   ///






More information about the llvm-commits mailing list