summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-03-19 10:43:15 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-03-19 10:43:15 +0000
commit2df4ceba15c130005967ee9e5fb4aa5568de1b0c (patch)
treeed0b1995da2c0a4a01f21270b60e8eb170029caf /include
parentcc5b84c6fba79a798e86ea604e54ca9429273a13 (diff)
downloadllvm-2df4ceba15c130005967ee9e5fb4aa5568de1b0c.tar.gz
llvm-2df4ceba15c130005967ee9e5fb4aa5568de1b0c.tar.bz2
llvm-2df4ceba15c130005967ee9e5fb4aa5568de1b0c.tar.xz
MC/Mach-O: Move to MachObjectWriter.{h,cpp}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98952 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MachObjectWriter.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/llvm/MC/MachObjectWriter.h b/include/llvm/MC/MachObjectWriter.h
new file mode 100644
index 0000000000..3e3305f083
--- /dev/null
+++ b/include/llvm/MC/MachObjectWriter.h
@@ -0,0 +1,43 @@
+//===-- llvm/MC/MachObjectWriter.h - Mach-O File Writer ---------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_MC_MACHOBJECTWRITER_H
+#define LLVM_MC_MACHOBJECTWRITER_H
+
+#include "llvm/MC/MCObjectWriter.h"
+#include "llvm/Support/raw_ostream.h"
+#include <cassert>
+
+namespace llvm {
+class MCAsmFixup;
+class MCAssembler;
+class MCDataFragment;
+class MCValue;
+class raw_ostream;
+
+class MachObjectWriter : public MCObjectWriter {
+ void *Impl;
+
+public:
+ MachObjectWriter(raw_ostream &OS, bool Is64Bit, bool IsLittleEndian = true);
+ virtual ~MachObjectWriter();
+
+ virtual void ExecutePostLayoutBinding(MCAssembler &Asm);
+
+ virtual void RecordRelocation(const MCAssembler &Asm,
+ const MCDataFragment &Fragment,
+ const MCAsmFixup &Fixup, MCValue Target,
+ uint64_t &FixedValue);
+
+ virtual void WriteObject(const MCAssembler &Asm);
+};
+
+} // End llvm namespace
+
+#endif