mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-23 12:08:25 +00:00
Wrap some darwin'isms with isDarwin checks.
llvm-svn: 30541
This commit is contained in:
parent
99b3c50130
commit
6d66264a5f
@ -49,9 +49,11 @@ namespace {
|
||||
|
||||
struct VISIBILITY_HIDDEN PPCAsmPrinter : public AsmPrinter {
|
||||
std::set<std::string> FnStubs, GVStubs;
|
||||
const PPCSubtarget &Subtarget;
|
||||
|
||||
PPCAsmPrinter(std::ostream &O, TargetMachine &TM, const TargetAsmInfo *T)
|
||||
: AsmPrinter(O, TM, T) {}
|
||||
: AsmPrinter(O, TM, T), Subtarget(TM.getSubtarget<PPCSubtarget>()) {
|
||||
}
|
||||
|
||||
virtual const char *getPassName() const {
|
||||
return "PowerPC Assembly Printer";
|
||||
@ -248,7 +250,7 @@ namespace {
|
||||
DarwinAsmPrinter(std::ostream &O, PPCTargetMachine &TM,
|
||||
const TargetAsmInfo *T)
|
||||
: PPCAsmPrinter(O, TM, T), DW(O, this, T) {
|
||||
bool isPPC64 = TM.getSubtargetImpl()->isPPC64();
|
||||
bool isPPC64 = Subtarget.isPPC64();
|
||||
}
|
||||
|
||||
virtual const char *getPassName() const {
|
||||
@ -480,7 +482,7 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
|
||||
|
||||
bool DarwinAsmPrinter::doInitialization(Module &M) {
|
||||
if (TM.getSubtarget<PPCSubtarget>().isGigaProcessor())
|
||||
if (Subtarget.isGigaProcessor())
|
||||
O << "\t.machine ppc970\n";
|
||||
AsmPrinter::doInitialization(M);
|
||||
|
||||
@ -637,6 +639,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
|
||||
// implementation of multiple entry points). If this doesn't occur, the
|
||||
// linker can safely perform dead code stripping. Since LLVM never generates
|
||||
// code that does this, it is always safe to set.
|
||||
if (Subtarget.isDarwin())
|
||||
O << "\t.subsections_via_symbols\n";
|
||||
|
||||
AsmPrinter::doFinalization(M);
|
||||
|
Loading…
Reference in New Issue
Block a user