[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCMachOWriterInfo.cpp PPCMachOWriterInfo.h
Bill Wendling
isanbard at gmail.com
Tue Jan 23 19:36:25 PST 2007
Changes in directory llvm/lib/Target/PowerPC:
PPCMachOWriterInfo.cpp added (r1.1)
PPCMachOWriterInfo.h added (r1.1)
---
Log message:
New "TargetMachOWriterInfo" class. It holds target-specific information
that the MachOWriter needs in order to do its writing stuff 'n things.
---
Diffs of the changes: (+57 -0)
PPCMachOWriterInfo.cpp | 22 ++++++++++++++++++++++
PPCMachOWriterInfo.h | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 57 insertions(+)
Index: llvm/lib/Target/PowerPC/PPCMachOWriterInfo.cpp
diff -c /dev/null llvm/lib/Target/PowerPC/PPCMachOWriterInfo.cpp:1.1
*** /dev/null Tue Jan 23 21:36:15 2007
--- llvm/lib/Target/PowerPC/PPCMachOWriterInfo.cpp Tue Jan 23 21:36:05 2007
***************
*** 0 ****
--- 1,22 ----
+ //===-- PPCMachOWriterInfo.cpp - Mach-O Writer Info for the PowerPC -------===//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by Bill Wendling and is distributed under the
+ // University of Illinois Open Source License. See LICENSE.TXT for details.
+ //
+ //===----------------------------------------------------------------------===//
+ //
+ // This file implements Mach-O writer information for the PowerPC backend.
+ //
+ //===----------------------------------------------------------------------===//
+
+ #include "PPCMachOWriterInfo.h"
+ #include "PPCTargetMachine.h"
+ using namespace llvm;
+
+ PPCMachOWriterInfo::PPCMachOWriterInfo(const PPCTargetMachine &TM)
+ : TargetMachOWriterInfo(TM.getTargetData()->getPointerSizeInBits() == 64 ?
+ HDR_CPU_TYPE_POWERPC64 :
+ HDR_CPU_TYPE_POWERPC,
+ HDR_CPU_SUBTYPE_POWERPC_ALL) {}
Index: llvm/lib/Target/PowerPC/PPCMachOWriterInfo.h
diff -c /dev/null llvm/lib/Target/PowerPC/PPCMachOWriterInfo.h:1.1
*** /dev/null Tue Jan 23 21:36:25 2007
--- llvm/lib/Target/PowerPC/PPCMachOWriterInfo.h Tue Jan 23 21:36:05 2007
***************
*** 0 ****
--- 1,35 ----
+ //===-- PPCMachOWriterInfo.h - Mach-O Writer Info for PowerPC ---*- C++ -*-===//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by Bill Wendling and is distributed under the
+ // University of Illinois Open Source License. See LICENSE.TXT for details.
+ //
+ //===----------------------------------------------------------------------===//
+ //
+ // This file implements Mach-O writer information for the PowerPC backend.
+ //
+ //===----------------------------------------------------------------------===//
+
+ #ifndef PPC_MACHO_WRITER_INFO_H
+ #define PPC_MACHO_WRITER_INFO_H
+
+ #include "llvm/Target/TargetMachOWriterInfo.h"
+
+ namespace llvm {
+
+ // Forward declarations
+ class PPCTargetMachine;
+
+ struct PPCMachOWriterInfo : public TargetMachOWriterInfo {
+ PPCMachOWriterInfo(const PPCTargetMachine &TM);
+ virtual ~PPCMachOWriterInfo() {}
+
+ virtual const char *getPassName() const {
+ return "PowerPC Mach-O Writer";
+ }
+ };
+
+ } // end llvm namespace
+
+ #endif // PPC_MACHO_WRITER_INFO_H
More information about the llvm-commits
mailing list