aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-20 17:12:19 +0000
committerChris Lattner <sabre@nondot.org>2006-09-20 17:12:19 +0000
commit4da1c82f724adba2832f79b3b49fc96c1467076d (patch)
tree476d951abfcfd8087e732648cfc72f5f0fdf6023 /lib/Target/PowerPC/PPCAsmPrinter.cpp
parentdadceedbdb9ef642c49283b632dcfefe48ee4cf4 (diff)
downloadexternal_llvm-4da1c82f724adba2832f79b3b49fc96c1467076d.zip
external_llvm-4da1c82f724adba2832f79b3b49fc96c1467076d.tar.gz
external_llvm-4da1c82f724adba2832f79b3b49fc96c1467076d.tar.bz2
The DarwinAsmPrinter need not check for isDarwin. createPPCAsmPrinterPass
should create the right asmprinter subclass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30542 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCAsmPrinter.cpp')
-rw-r--r--lib/Target/PowerPC/PPCAsmPrinter.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
index e04e72d..3524463 100644
--- a/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -270,15 +270,6 @@ namespace {
};
} // end of anonymous namespace
-/// createDarwinCodePrinterPass - Returns a pass that prints the PPC assembly
-/// code for a MachineFunction to the given output stream, in a format that the
-/// Darwin assembler can deal with.
-///
-FunctionPass *llvm::createDarwinCodePrinterPass(std::ostream &o,
- PPCTargetMachine &tm) {
- return new DarwinAsmPrinter(o, tm, tm.getTargetAsmInfo());
-}
-
// Include the auto-generated portion of the assembly writer
#include "PPCGenAsmWriter.inc"
@@ -639,10 +630,20 @@ 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";
+ O << "\t.subsections_via_symbols\n";
AsmPrinter::doFinalization(M);
return false; // success
}
+
+
+/// createDarwinCodePrinterPass - Returns a pass that prints the PPC assembly
+/// code for a MachineFunction to the given output stream, in a format that the
+/// Darwin assembler can deal with.
+///
+FunctionPass *llvm::createPPCAsmPrinterPass(std::ostream &o,
+ PPCTargetMachine &tm) {
+ return new DarwinAsmPrinter(o, tm, tm.getTargetAsmInfo());
+}
+