diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-11 22:51:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-11 22:51:34 +0000 |
commit | 63d5be8a7b9219734102e35695430a5357bb24de (patch) | |
tree | 2c9cb4f658d18c4c61408fffd315b422a1be525c /llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp | |
parent | e655521a289c91fa645fd3bd9a4cb9e8f8994a6d (diff) | |
download | bcm5719-llvm-63d5be8a7b9219734102e35695430a5357bb24de.tar.gz bcm5719-llvm-63d5be8a7b9219734102e35695430a5357bb24de.zip |
pass "is64Bit" flag into PPC TAI ctors instead of a whole targetmachine.
llvm-svn: 78743
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp index 925e5907860..e32f34c3128 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp @@ -12,27 +12,19 @@ //===----------------------------------------------------------------------===// #include "PPCTargetAsmInfo.h" -#include "PPCTargetMachine.h" -#include "llvm/Function.h" -#include "llvm/Support/Dwarf.h" - using namespace llvm; -using namespace llvm::dwarf; -PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM) { +PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(bool is64Bit) { PCSymbol = "."; CommentString = ";"; ExceptionsType = ExceptionHandling::Dwarf; - const PPCSubtarget *Subtarget = &TM.getSubtarget<PPCSubtarget>(); - bool isPPC64 = Subtarget->isPPC64(); - - if (!isPPC64) + if (!is64Bit) Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode. AssemblerDialect = 0; // Old-Style mnemonics. } -PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) { +PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(bool is64Bit) { CommentString = "#"; GlobalPrefix = ""; PrivateGlobalPrefix = ".L"; @@ -48,17 +40,14 @@ PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) { // Set up DWARF directives HasLEB128 = true; // Target asm supports leb128 directives (little-endian) - const PPCSubtarget *Subtarget = &TM.getSubtarget<PPCSubtarget>(); - bool isPPC64 = Subtarget->isPPC64(); - // Exceptions handling - if (!isPPC64) + if (!is64Bit) ExceptionsType = ExceptionHandling::Dwarf; AbsoluteEHSectionOffsets = false; ZeroDirective = "\t.space\t"; SetDirective = "\t.set"; - Data64bitsDirective = isPPC64 ? "\t.quad\t" : 0; + Data64bitsDirective = is64Bit ? "\t.quad\t" : 0; AlignmentIsInBytes = false; LCOMMDirective = "\t.lcomm\t"; AssemblerDialect = 1; // New-Style mnemonics. |