clang  8.0.0
ARC.h
Go to the documentation of this file.
1 //===--- ARC.h - Declare ARC target feature support -------------*- 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 // This file declares ARC TargetInfo objects.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_ARC_H
15 #define LLVM_CLANG_LIB_BASIC_TARGETS_ARC_H
16 
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 ARCTargetInfo : public TargetInfo {
26 public:
27  ARCTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
28  : TargetInfo(Triple) {
29  NoAsmVariants = true;
30  LongLongAlign = 32;
31  SuitableAlign = 32;
32  DoubleAlign = LongDoubleAlign = 32;
33  SizeType = UnsignedInt;
34  PtrDiffType = SignedInt;
35  IntPtrType = SignedInt;
36  UseZeroLengthBitfieldAlignment = true;
37  resetDataLayout("e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-"
38  "i32:32:32-f32:32:32-i64:32-f64:32-a:0:32-n32");
39  }
40 
41  void getTargetDefines(const LangOptions &Opts,
42  MacroBuilder &Builder) const override;
43 
44  ArrayRef<Builtin::Info> getTargetBuiltins() const override { return None; }
45 
48  }
49 
50  const char *getClobbers() const override { return ""; }
51 
53  static const char *const GCCRegNames[] = {
54  "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
55  "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
56  "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
57  "r24", "r25", "gp", "sp", "fp", "ilink1", "r30", "blink"};
58  return llvm::makeArrayRef(GCCRegNames);
59  }
60 
62  return None;
63  }
64 
65  bool validateAsmConstraint(const char *&Name,
66  TargetInfo::ConstraintInfo &Info) const override {
67  return false;
68  }
69 };
70 
71 } // namespace targets
72 } // namespace clang
73 
74 #endif // LLVM_CLANG_LIB_BASIC_TARGETS_ARC_H
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
Definition: ARC.h:44
Options for controlling the target.
Definition: TargetOptions.h:27
const char * getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.
Definition: ARC.h:50
ARCTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
Definition: ARC.h:27
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:50
ArrayRef< TargetInfo::GCCRegAlias > getGCCRegAliases() const override
Definition: ARC.h:61
static const char *const GCCRegNames[]
Definition: X86.cpp:44
bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &Info) const override
Definition: ARC.h:65
typedef void* __builtin_va_list;
Definition: TargetInfo.h:187
Exposes information about the current target.
Definition: TargetInfo.h:54
Defines the clang::TargetOptions class.
Dataflow Directional Tag Classes.
ArrayRef< const char * > getGCCRegNames() const override
Definition: ARC.h:52
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
Definition: TargetInfo.h:182
Defines the clang::TargetInfo interface.
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
Definition: ARC.h:46