Joe Abbey | 8e72eb7 | 2014-09-16 09:18:23 +0000 | [diff] [blame] | 1 | //===-- ARMAsmBackendDarwin.h ARM Asm Backend Darwin ----------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef LLVM_LIB_TARGET_ARM_ARMASMBACKENDDARWIN_H |
| 11 | #define LLVM_LIB_TARGET_ARM_ARMASMBACKENDDARWIN_H |
| 12 | |
| 13 | #include "llvm/Support/MachO.h" |
| 14 | |
| 15 | using namespace llvm; |
| 16 | |
| 17 | namespace { |
| 18 | class ARMAsmBackendDarwin : public ARMAsmBackend { |
| 19 | public: |
| 20 | const MachO::CPUSubTypeARM Subtype; |
Daniel Sanders | 153010c | 2015-09-15 14:08:28 +0000 | [diff] [blame] | 21 | ARMAsmBackendDarwin(const Target &T, const TargetTuple &TT, |
Daniel Sanders | 418caf5 | 2015-06-10 10:35:34 +0000 | [diff] [blame] | 22 | MachO::CPUSubTypeARM st) |
Joe Abbey | 8e72eb7 | 2014-09-16 09:18:23 +0000 | [diff] [blame] | 23 | : ARMAsmBackend(T, TT, /* IsLittleEndian */ true), Subtype(st) { |
| 24 | HasDataInCodeSupport = true; |
| 25 | } |
| 26 | |
Rafael Espindola | 5560a4c | 2015-04-14 22:14:34 +0000 | [diff] [blame] | 27 | MCObjectWriter *createObjectWriter(raw_pwrite_stream &OS) const override { |
Joe Abbey | 8e72eb7 | 2014-09-16 09:18:23 +0000 | [diff] [blame] | 28 | return createARMMachObjectWriter(OS, /*Is64Bit=*/false, MachO::CPU_TYPE_ARM, |
| 29 | Subtype); |
| 30 | } |
| 31 | }; |
Alexander Kornienko | f00654e | 2015-06-23 09:49:53 +0000 | [diff] [blame] | 32 | } |
Joe Abbey | 8e72eb7 | 2014-09-16 09:18:23 +0000 | [diff] [blame] | 33 | |
| 34 | #endif |