[llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp PowerPCTargetMachine.h
Chris Lattner
lattner at cs.uiuc.edu
Fri Jun 24 19:48:50 PDT 2005
Changes in directory llvm/lib/Target/PowerPC:
PowerPCTargetMachine.cpp updated: 1.51 -> 1.52
PowerPCTargetMachine.h updated: 1.12 -> 1.13
---
Log message:
Refactor the addPassesToEmitAssembly interface into a addPassesToEmitFile
interface.
---
Diffs of the changes: (+9 -5)
PowerPCTargetMachine.cpp | 11 +++++++----
PowerPCTargetMachine.h | 3 ++-
2 files changed, 9 insertions(+), 5 deletions(-)
Index: llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp
diff -u llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.51 llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.52
--- llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.51 Thu Apr 21 18:20:02 2005
+++ llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp Fri Jun 24 21:48:37 2005
@@ -73,11 +73,14 @@
#endif
}
-/// addPassesToEmitAssembly - Add passes to the specified pass manager
-/// to implement a static compiler for this target.
+/// addPassesToEmitFile - Add passes to the specified pass manager to implement
+/// a static compiler for this target.
///
-bool PowerPCTargetMachine::addPassesToEmitAssembly(PassManager &PM,
- std::ostream &Out) {
+bool PowerPCTargetMachine::addPassesToEmitFile(PassManager &PM,
+ std::ostream &Out,
+ CodeGenFileType FileType) {
+ if (FileType != TargetMachine::AssemblyFile) return true;
+
bool LP64 = (0 != dynamic_cast<PPC64TargetMachine *>(this));
if (EnablePPCLSR) {
Index: llvm/lib/Target/PowerPC/PowerPCTargetMachine.h
diff -u llvm/lib/Target/PowerPC/PowerPCTargetMachine.h:1.12 llvm/lib/Target/PowerPC/PowerPCTargetMachine.h:1.13
--- llvm/lib/Target/PowerPC/PowerPCTargetMachine.h:1.12 Thu Apr 21 18:20:02 2005
+++ llvm/lib/Target/PowerPC/PowerPCTargetMachine.h Fri Jun 24 21:48:37 2005
@@ -32,7 +32,8 @@
public:
virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
- virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
+ virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
+ CodeGenFileType FileType);
};
} // end namespace llvm
More information about the llvm-commits
mailing list