aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCTargetMachine.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-12-21 20:26:09 +0000
committerJim Laskey <jlaskey@mac.com>2006-12-21 20:26:09 +0000
commitbf1118285c0f784b120a69b4a4207e15ef065ead (patch)
tree9d4371582134d96edadeda51309ab4cc4025dd02 /lib/Target/PowerPC/PPCTargetMachine.cpp
parent787bfe654cd617425f07255188d98fe0c2db34c1 (diff)
Changes from Nick Lewycky with a simplified PPCTargetAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32735 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--lib/Target/PowerPC/PPCTargetMachine.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
index 8cf85d186f..249a639f8c 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -28,7 +28,10 @@ namespace {
}
const TargetAsmInfo *PPCTargetMachine::createTargetAsmInfo() const {
- return new DarwinTargetAsmInfo(*this);
+ if (Subtarget.isDarwin())
+ return new DarwinTargetAsmInfo(*this);
+ else
+ return new LinuxTargetAsmInfo(*this);
}
unsigned PPC32TargetMachine::getJITMatchQuality() {
@@ -90,7 +93,7 @@ PPCTargetMachine::PPCTargetMachine(const Module &M, const std::string &FS,
if (Subtarget.isDarwin())
setRelocationModel(Reloc::DynamicNoPIC);
else
- setRelocationModel(Reloc::PIC_);
+ setRelocationModel(Reloc::Static);
}
PPC32TargetMachine::PPC32TargetMachine(const Module &M, const std::string &FS)