clang  14.0.0git
M68k.h
Go to the documentation of this file.
1 //===--- M68k.h - Declare M68k target feature support -------*- 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 M68k TargetInfo objects.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_M68K_H
14 #define LLVM_CLANG_LIB_BASIC_TARGETS_M68K_H
15 
16 #include "OSTargets.h"
17 #include "clang/Basic/TargetInfo.h"
19 #include "llvm/ADT/Triple.h"
20 #include "llvm/Support/Compiler.h"
21 
22 namespace clang {
23 namespace targets {
24 
25 class LLVM_LIBRARY_VISIBILITY M68kTargetInfo : public TargetInfo {
26  static const char *const GCCRegNames[];
27 
28  enum CPUKind {
29  CK_Unknown,
30  CK_68000,
31  CK_68010,
32  CK_68020,
33  CK_68030,
34  CK_68040,
35  CK_68060
36  } CPU = CK_Unknown;
37 
38 public:
39  M68kTargetInfo(const llvm::Triple &Triple, const TargetOptions &);
40 
41  void getTargetDefines(const LangOptions &Opts,
42  MacroBuilder &Builder) const override;
43  ArrayRef<Builtin::Info> getTargetBuiltins() const override;
44  bool hasFeature(StringRef Feature) const override;
45  ArrayRef<const char *> getGCCRegNames() const override;
46  ArrayRef<TargetInfo::GCCRegAlias> getGCCRegAliases() const override;
47  std::string convertConstraint(const char *&Constraint) const override;
48  bool validateAsmConstraint(const char *&Name,
49  TargetInfo::ConstraintInfo &info) const override;
50  llvm::Optional<std::string> handleAsmEscapedChar(char EscChar) const override;
51  const char *getClobbers() const override;
52  BuiltinVaListKind getBuiltinVaListKind() const override;
53  bool setCPU(const std::string &Name) override;
54 };
55 
56 } // namespace targets
57 } // namespace clang
58 
59 #endif
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
TargetInfo.h
clang::TargetInfo
Exposes information about the current target.
Definition: TargetInfo.h:189
llvm::Optional< std::string >
clang::TargetInfo::BuiltinVaListKind
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
Definition: TargetInfo.h:265
clang::targets::M68kTargetInfo
Definition: M68k.h:25
clang::targets::GCCRegNames
static const char *const GCCRegNames[]
Definition: X86.cpp:43
TargetOptions.h
llvm::ArrayRef
Definition: LLVM.h:34
clang::TargetInfo::ConstraintInfo
Definition: TargetInfo.h:960
clang::LangOptions
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:58
clang
Definition: CalledOnceCheck.h:17
OSTargets.h
clang::TargetOptions
Options for controlling the target.
Definition: TargetOptions.h:26
clang::MacroBuilder
Definition: MacroBuilder.h:23
hasFeature
static bool hasFeature(StringRef Feature, const LangOptions &LangOpts, const TargetInfo &Target)
Determine whether a translation unit built using the current language options has the given feature.
Definition: Module.cpp:101