xref: /freebsd/contrib/llvm-project/llvm/lib/Target/CSKY/CSKYTargetMachine.h (revision 0d8fe2373503aeac48492f28073049a8bfa4feb5)
1 //===--- CSKYTargetMachine.h - Define TargetMachine for CSKY ----*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the CSKY specific subclass of TargetMachine.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_CSKY_CSKYTARGETMACHINE_H
14 #define LLVM_LIB_TARGET_CSKY_CSKYTARGETMACHINE_H
15 
16 #include "llvm/IR/DataLayout.h"
17 #include "llvm/Target/TargetMachine.h"
18 
19 namespace llvm {
20 
21 class CSKYTargetMachine : public LLVMTargetMachine {
22   std::unique_ptr<TargetLoweringObjectFile> TLOF;
23 
24 public:
25   CSKYTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
26                     StringRef FS, const TargetOptions &Options,
27                     Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM,
28                     CodeGenOpt::Level OL, bool JIT);
29 
30   TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
31 
32   TargetLoweringObjectFile *getObjFileLowering() const override {
33     return TLOF.get();
34   }
35 };
36 } // namespace llvm
37 
38 #endif
39