mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28074 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -85,7 +85,7 @@ protected:
|
||||
AsmPrinter *Asm;
|
||||
|
||||
/// TD - Target data.
|
||||
const TargetData &TD;
|
||||
const TargetData *TD;
|
||||
|
||||
/// RI - Register Information.
|
||||
const MRegisterInfo *RI;
|
||||
|
@@ -42,11 +42,11 @@ struct MachineConstantPoolEntry {
|
||||
};
|
||||
|
||||
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.
|
||||
|
@@ -37,10 +37,10 @@ struct MachineJumpTableEntry {
|
||||
};
|
||||
|
||||
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.
|
||||
///
|
||||
|
Reference in New Issue
Block a user