summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PIC16
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-15 12:11:05 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-15 12:11:05 +0000
commit6db8134e8090f97fb276363b7f6455f847e4df62 (patch)
tree6552223a1e668f3643f44a061f81d80c75fef8f2 /llvm/lib/Target/PIC16
parent2d8c9aeed72b1ca33340b7a64ca8aa2a7a325f41 (diff)
downloadbcm5719-llvm-6db8134e8090f97fb276363b7f6455f847e4df62.tar.gz
bcm5719-llvm-6db8134e8090f97fb276363b7f6455f847e4df62.zip
Provide TargetMachine implementations with reference to Target they were created
from. - This commit is almost entirely propogating the reference through the TargetMachine subclasses' constructor calls. llvm-svn: 75778
Diffstat (limited to 'llvm/lib/Target/PIC16')
-rw-r--r--llvm/lib/Target/PIC16/PIC16TargetMachine.cpp12
-rw-r--r--llvm/lib/Target/PIC16/PIC16TargetMachine.h4
2 files changed, 9 insertions, 7 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16TargetMachine.cpp b/llvm/lib/Target/PIC16/PIC16TargetMachine.cpp
index f3f39561cdd..45a61fa29be 100644
--- a/llvm/lib/Target/PIC16/PIC16TargetMachine.cpp
+++ b/llvm/lib/Target/PIC16/PIC16TargetMachine.cpp
@@ -44,17 +44,19 @@ Y(TheCooperTarget, "cooper", "PIC16 Cooper [experimental].");
extern "C" void LLVMInitializePIC16Target() { }
// PIC16TargetMachine - Traditional PIC16 Machine.
-PIC16TargetMachine::PIC16TargetMachine(const Module &M, const std::string &FS,
- bool Cooper)
-: Subtarget(M, FS, Cooper),
+PIC16TargetMachine::PIC16TargetMachine(const Target &T, const Module &M,
+ const std::string &FS, bool Cooper)
+: LLVMTargetMachine(T),
+ Subtarget(M, FS, Cooper),
DataLayout("e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8"),
InstrInfo(*this), TLInfo(*this),
FrameInfo(TargetFrameInfo::StackGrowsUp, 8, 0) { }
// CooperTargetMachine - Uses the same PIC16TargetMachine, but makes IsCooper
// as true.
-CooperTargetMachine::CooperTargetMachine(const Module &M, const std::string &FS)
- : PIC16TargetMachine(M, FS, true) {}
+CooperTargetMachine::CooperTargetMachine(const Target &T, const Module &M,
+ const std::string &FS)
+ : PIC16TargetMachine(T, M, FS, true) {}
const TargetAsmInfo *PIC16TargetMachine::createTargetAsmInfo() const {
diff --git a/llvm/lib/Target/PIC16/PIC16TargetMachine.h b/llvm/lib/Target/PIC16/PIC16TargetMachine.h
index a0080df6c5f..f14d8fd28f8 100644
--- a/llvm/lib/Target/PIC16/PIC16TargetMachine.h
+++ b/llvm/lib/Target/PIC16/PIC16TargetMachine.h
@@ -41,7 +41,7 @@ protected:
virtual const TargetAsmInfo *createTargetAsmInfo() const;
public:
- PIC16TargetMachine(const Module &M, const std::string &FS,
+ PIC16TargetMachine(const Target &T, const Module &M, const std::string &FS,
bool Cooper = false);
virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
@@ -68,7 +68,7 @@ public:
/// CooperTargetMachine
class CooperTargetMachine : public PIC16TargetMachine {
public:
- CooperTargetMachine(const Module &M, const std::string &FS);
+ CooperTargetMachine(const Target &T, const Module &M, const std::string &FS);
}; // CooperTargetMachine.
} // end namespace llvm
OpenPOWER on IntegriCloud