[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC.h PPCAsmPrinter.cpp PPCTargetMachine.cpp
Chris Lattner
sabre at nondot.org
Wed Sep 20 10:12:33 PDT 2006
Changes in directory llvm/lib/Target/PowerPC:
PPC.h updated: 1.33 -> 1.34
PPCAsmPrinter.cpp updated: 1.195 -> 1.196
PPCTargetMachine.cpp updated: 1.106 -> 1.107
---
Log message:
The DarwinAsmPrinter need not check for isDarwin. createPPCAsmPrinterPass
should create the right asmprinter subclass.
---
Diffs of the changes: (+15 -14)
PPC.h | 4 ++--
PPCAsmPrinter.cpp | 23 ++++++++++++-----------
PPCTargetMachine.cpp | 2 +-
3 files changed, 15 insertions(+), 14 deletions(-)
Index: llvm/lib/Target/PowerPC/PPC.h
diff -u llvm/lib/Target/PowerPC/PPC.h:1.33 llvm/lib/Target/PowerPC/PPC.h:1.34
--- llvm/lib/Target/PowerPC/PPC.h:1.33 Wed Sep 6 13:34:40 2006
+++ llvm/lib/Target/PowerPC/PPC.h Wed Sep 20 12:12:19 2006
@@ -26,8 +26,8 @@
FunctionPass *createPPCBranchSelectionPass();
FunctionPass *createPPCISelDag(PPCTargetMachine &TM);
-FunctionPass *createDarwinCodePrinterPass(std::ostream &OS,
- PPCTargetMachine &TM);
+FunctionPass *createPPCAsmPrinterPass(std::ostream &OS,
+ PPCTargetMachine &TM);
FunctionPass *createPPCCodeEmitterPass(PPCTargetMachine &TM,
MachineCodeEmitter &MCE);
void addPPCMachOObjectWriterPass(FunctionPassManager &FPM, std::ostream &o,
Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.195 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.196
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.195 Wed Sep 20 12:07:15 2006
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Wed Sep 20 12:12:19 2006
@@ -270,15 +270,6 @@
};
} // 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 @@
// 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());
+}
+
Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.106 llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.107
--- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.106 Thu Sep 7 22:42:15 2006
+++ llvm/lib/Target/PowerPC/PPCTargetMachine.cpp Wed Sep 20 12:12:19 2006
@@ -122,7 +122,7 @@
bool PPCTargetMachine::addAssemblyEmitter(FunctionPassManager &PM, bool Fast,
std::ostream &Out) {
- PM.add(createDarwinCodePrinterPass(Out, *this));
+ PM.add(createPPCAsmPrinterPass(Out, *this));
return false;
}
More information about the llvm-commits
mailing list