xref: /freebsd/contrib/llvm-project/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendELF.h (revision 5f757f3ff9144b609b3c433dfd370cc6bdc191ad)
10b57cec5SDimitry Andric //===-- ARMAsmBackendELF.h  ARM Asm Backend ELF -----------------*- C++ -*-===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric 
90b57cec5SDimitry Andric #ifndef LLVM_LIB_TARGET_ARM_ELFARMASMBACKEND_H
100b57cec5SDimitry Andric #define LLVM_LIB_TARGET_ARM_ELFARMASMBACKEND_H
110b57cec5SDimitry Andric 
120b57cec5SDimitry Andric #include "ARMAsmBackend.h"
130b57cec5SDimitry Andric #include "MCTargetDesc/ARMMCTargetDesc.h"
140b57cec5SDimitry Andric #include "llvm/MC/MCObjectWriter.h"
150b57cec5SDimitry Andric 
160b57cec5SDimitry Andric using namespace llvm;
170b57cec5SDimitry Andric 
180b57cec5SDimitry Andric namespace {
190b57cec5SDimitry Andric class ARMAsmBackendELF : public ARMAsmBackend {
200b57cec5SDimitry Andric public:
210b57cec5SDimitry Andric   uint8_t OSABI;
22349cc55cSDimitry Andric   ARMAsmBackendELF(const Target &T, bool isThumb, uint8_t OSABI,
23*5f757f3fSDimitry Andric                    llvm::endianness Endian)
24349cc55cSDimitry Andric       : ARMAsmBackend(T, isThumb, Endian), OSABI(OSABI) {}
250b57cec5SDimitry Andric 
260b57cec5SDimitry Andric   std::unique_ptr<MCObjectTargetWriter>
270b57cec5SDimitry Andric   createObjectTargetWriter() const override {
280b57cec5SDimitry Andric     return createARMELFObjectWriter(OSABI);
290b57cec5SDimitry Andric   }
30349cc55cSDimitry Andric 
31bdd1243dSDimitry Andric   std::optional<MCFixupKind> getFixupKind(StringRef Name) const override;
320b57cec5SDimitry Andric };
330b57cec5SDimitry Andric }
340b57cec5SDimitry Andric 
350b57cec5SDimitry Andric #endif
36