diff options
author | Owen Anderson <resistor@mac.com> | 2006-05-03 01:29:57 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2006-05-03 01:29:57 +0000 |
commit | a69571c7991813c93cba64e88eced6899ce93d81 (patch) | |
tree | 06bc81338c35527b69a6e8e7434e7c1a824bc4ca /lib/Target/Alpha/AlphaTargetMachine.h | |
parent | 0eb4d6b52e1b5db9a4c86e5a954356ae3507a287 (diff) | |
download | llvm-a69571c7991813c93cba64e88eced6899ce93d81.tar.gz llvm-a69571c7991813c93cba64e88eced6899ce93d81.tar.bz2 llvm-a69571c7991813c93cba64e88eced6899ce93d81.tar.xz |
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
Diffstat (limited to 'lib/Target/Alpha/AlphaTargetMachine.h')
-rw-r--r-- | lib/Target/Alpha/AlphaTargetMachine.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/Alpha/AlphaTargetMachine.h b/lib/Target/Alpha/AlphaTargetMachine.h index 8f6caeb6c2..6e23868172 100644 --- a/lib/Target/Alpha/AlphaTargetMachine.h +++ b/lib/Target/Alpha/AlphaTargetMachine.h @@ -26,11 +26,12 @@ namespace llvm { class GlobalValue; class AlphaTargetMachine : public TargetMachine { + const TargetData DataLayout; // Calculates type size & alignment AlphaInstrInfo InstrInfo; TargetFrameInfo FrameInfo; AlphaJITInfo JITInfo; AlphaSubtarget Subtarget; - + public: AlphaTargetMachine(const Module &M, const std::string &FS); @@ -40,6 +41,7 @@ public: virtual const MRegisterInfo *getRegisterInfo() const { return &InstrInfo.getRegisterInfo(); } + virtual const TargetData *getTargetData() const { return &DataLayout; } virtual TargetJITInfo* getJITInfo() { return &JITInfo; } |