summaryrefslogtreecommitdiffstats
path: root/llvm/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
commita81a75c39035f9e47e54d9dbb9df6ae5b654a18f (patch)
tree1935629983b86111d0d40568359c4816407cc1db /llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
parent8597a2fc4e0fe735d07a2c6866f56fa12e2ad447 (diff)
downloadbcm5719-llvm-a81a75c39035f9e47e54d9dbb9df6ae5b654a18f.tar.gz
bcm5719-llvm-a81a75c39035f9e47e54d9dbb9df6ae5b654a18f.zip
The DarwinAsmPrinter need not check for isDarwin. createPPCAsmPrinterPass
should create the right asmprinter subclass. llvm-svn: 30542
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index e04e72d7499..35244632eb5 100644
--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/llvm/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());
+}
+
OpenPOWER on IntegriCloud