Clang Project

clang_source_code/include/clang/Basic/TargetInfo.h
1//===--- TargetInfo.h - Expose information about the target -----*- 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/// \file
10/// Defines the clang::TargetInfo interface.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_BASIC_TARGETINFO_H
15#define LLVM_CLANG_BASIC_TARGETINFO_H
16
17#include "clang/Basic/AddressSpaces.h"
18#include "clang/Basic/LLVM.h"
19#include "clang/Basic/Specifiers.h"
20#include "clang/Basic/TargetCXXABI.h"
21#include "clang/Basic/TargetOptions.h"
22#include "llvm/ADT/APInt.h"
23#include "llvm/ADT/IntrusiveRefCntPtr.h"
24#include "llvm/ADT/Optional.h"
25#include "llvm/ADT/SmallSet.h"
26#include "llvm/ADT/StringMap.h"
27#include "llvm/ADT/StringRef.h"
28#include "llvm/ADT/Triple.h"
29#include "llvm/IR/DataLayout.h"
30#include "llvm/Support/DataTypes.h"
31#include "llvm/Support/VersionTuple.h"
32#include <cassert>
33#include <string>
34#include <vector>
35
36namespace llvm {
37struct fltSemantics;
38}
39
40namespace clang {
41class DiagnosticsEngine;
42class LangOptions;
43class CodeGenOptions;
44class MacroBuilder;
45class QualType;
46class SourceLocation;
47class SourceManager;
48
49namespace Builtin { struct Info; }
50
51/// Fields controlling how types are laid out in memory; these may need to
52/// be copied for targets like AMDGPU that base their ABIs on an auxiliary
53/// CPU target.
54struct TransferrableTargetInfo {
55  unsigned char PointerWidthPointerAlign;
56  unsigned char BoolWidthBoolAlign;
57  unsigned char IntWidthIntAlign;
58  unsigned char HalfWidthHalfAlign;
59  unsigned char FloatWidthFloatAlign;
60  unsigned char DoubleWidthDoubleAlign;
61  unsigned char LongDoubleWidthLongDoubleAlignFloat128Align;
62  unsigned char LargeArrayMinWidthLargeArrayAlign;
63  unsigned char LongWidthLongAlign;
64  unsigned char LongLongWidthLongLongAlign;
65
66  // Fixed point bit widths
67  unsigned char ShortAccumWidthShortAccumAlign;
68  unsigned char AccumWidthAccumAlign;
69  unsigned char LongAccumWidthLongAccumAlign;
70  unsigned char ShortFractWidthShortFractAlign;
71  unsigned char FractWidthFractAlign;
72  unsigned char LongFractWidthLongFractAlign;
73
74  // If true, unsigned fixed point types have the same number of fractional bits
75  // as their signed counterparts, forcing the unsigned types to have one extra
76  // bit of padding. Otherwise, unsigned fixed point types have
77  // one more fractional bit than its corresponding signed type. This is false
78  // by default.
79  bool PaddingOnUnsignedFixedPoint;
80
81  // Fixed point integral and fractional bit sizes
82  // Saturated types share the same integral/fractional bits as their
83  // corresponding unsaturated types.
84  // For simplicity, the fractional bits in a _Fract type will be one less the
85  // width of that _Fract type. This leaves all signed _Fract types having no
86  // padding and unsigned _Fract types will only have 1 bit of padding after the
87  // sign if PaddingOnUnsignedFixedPoint is set.
88  unsigned char ShortAccumScale;
89  unsigned char AccumScale;
90  unsigned char LongAccumScale;
91
92  unsigned char SuitableAlign;
93  unsigned char DefaultAlignForAttributeAligned;
94  unsigned char MinGlobalAlign;
95
96  unsigned short NewAlign;
97  unsigned short MaxVectorAlign;
98  unsigned short MaxTLSAlign;
99
100  const llvm::fltSemantics *HalfFormat, *FloatFormat, *DoubleFormat,
101    *LongDoubleFormat, *Float128Format;
102
103  ///===---- Target Data Type Query Methods -------------------------------===//
104  enum IntType {
105    NoInt = 0,
106    SignedChar,
107    UnsignedChar,
108    SignedShort,
109    UnsignedShort,
110    SignedInt,
111    UnsignedInt,
112    SignedLong,
113    UnsignedLong,
114    SignedLongLong,
115    UnsignedLongLong
116  };
117
118  enum RealType {
119    NoFloat = 255,
120    Float = 0,
121    Double,
122    LongDouble,
123    Float128
124  };
125protected:
126  IntType SizeTypeIntMaxTypePtrDiffTypeIntPtrTypeWCharType,
127          WIntTypeChar16TypeChar32TypeInt64TypeSigAtomicType,
128          ProcessIDType;
129
130  /// Whether Objective-C's built-in boolean type should be signed char.
131  ///
132  /// Otherwise, when this flag is not set, the normal built-in boolean type is
133  /// used.
134  unsigned UseSignedCharForObjCBool : 1;
135
136  /// Control whether the alignment of bit-field types is respected when laying
137  /// out structures. If true, then the alignment of the bit-field type will be
138  /// used to (a) impact the alignment of the containing structure, and (b)
139  /// ensure that the individual bit-field will not straddle an alignment
140  /// boundary.
141  unsigned UseBitFieldTypeAlignment : 1;
142
143  /// Whether zero length bitfields (e.g., int : 0;) force alignment of
144  /// the next bitfield.
145  ///
146  /// If the alignment of the zero length bitfield is greater than the member
147  /// that follows it, `bar', `bar' will be aligned as the type of the
148  /// zero-length bitfield.
149  unsigned UseZeroLengthBitfieldAlignment : 1;
150
151  ///  Whether explicit bit field alignment attributes are honored.
152  unsigned UseExplicitBitFieldAlignment : 1;
153
154  /// If non-zero, specifies a fixed alignment value for bitfields that follow
155  /// zero length bitfield, regardless of the zero length bitfield type.
156  unsigned ZeroLengthBitfieldBoundary;
157};
158
159/// Exposes information about the current target.
160///
161class TargetInfo : public virtual TransferrableTargetInfo,
162                   public RefCountedBase<TargetInfo> {
163  std::shared_ptr<TargetOptionsTargetOpts;
164  llvm::Triple Triple;
165protected:
166  // Target values set by the ctor of the actual target implementation.  Default
167  // values are specified by the TargetInfo constructor.
168  bool BigEndian;
169  bool TLSSupported;
170  bool VLASupported;
171  bool NoAsmVariants;  // True if {|} are normal characters.
172  bool HasLegalHalfType// True if the backend supports operations on the half
173                         // LLVM IR type.
174  bool HasFloat128;
175  bool HasFloat16;
176
177  unsigned char MaxAtomicPromoteWidthMaxAtomicInlineWidth;
178  unsigned short SimdDefaultAlign;
179  std::unique_ptr<llvm::DataLayoutDataLayout;
180  const char *MCountName;
181  unsigned char RegParmMaxSSERegParmMax;
182  TargetCXXABI TheCXXABI;
183  const LangASMap *AddrSpaceMap;
184
185  mutable StringRef PlatformName;
186  mutable VersionTuple PlatformMinVersion;
187
188  unsigned HasAlignMac68kSupport : 1;
189  unsigned RealTypeUsesObjCFPRet : 3;
190  unsigned ComplexLongDoubleUsesFP2Ret : 1;
191
192  unsigned HasBuiltinMSVaList : 1;
193
194  unsigned IsRenderScriptTarget : 1;
195
196  // TargetInfo Constructor.  Default initializes all fields.
197  TargetInfo(const llvm::Triple &T);
198
199  void resetDataLayout(StringRef DL) {
200    DataLayout.reset(new llvm::DataLayout(DL));
201  }
202
203public:
204  /// Construct a target for the given options.
205  ///
206  /// \param Opts - The options to use to initialize the target. The target may
207  /// modify the options to canonicalize the target feature information to match
208  /// what the backend expects.
209  static TargetInfo *
210  CreateTargetInfo(DiagnosticsEngine &Diags,
211                   const std::shared_ptr<TargetOptions> &Opts);
212
213  virtual ~TargetInfo();
214
215  /// Retrieve the target options.
216  TargetOptions &getTargetOpts() const {
217     (0) . __assert_fail ("TargetOpts && \"Missing target options\"", "/home/seafit/code_projects/clang_source/clang/include/clang/Basic/TargetInfo.h", 217, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(TargetOpts && "Missing target options");
218    return *TargetOpts;
219  }
220
221  /// The different kinds of __builtin_va_list types defined by
222  /// the target implementation.
223  enum BuiltinVaListKind {
224    /// typedef char* __builtin_va_list;
225    CharPtrBuiltinVaList = 0,
226
227    /// typedef void* __builtin_va_list;
228    VoidPtrBuiltinVaList,
229
230    /// __builtin_va_list as defined by the AArch64 ABI
231    /// http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055a/IHI0055A_aapcs64.pdf
232    AArch64ABIBuiltinVaList,
233
234    /// __builtin_va_list as defined by the PNaCl ABI:
235    /// http://www.chromium.org/nativeclient/pnacl/bitcode-abi#TOC-Machine-Types
236    PNaClABIBuiltinVaList,
237
238    /// __builtin_va_list as defined by the Power ABI:
239    /// https://www.power.org
240    ///        /resources/downloads/Power-Arch-32-bit-ABI-supp-1.0-Embedded.pdf
241    PowerABIBuiltinVaList,
242
243    /// __builtin_va_list as defined by the x86-64 ABI:
244    /// http://refspecs.linuxbase.org/elf/x86_64-abi-0.21.pdf
245    X86_64ABIBuiltinVaList,
246
247    /// __builtin_va_list as defined by ARM AAPCS ABI
248    /// http://infocenter.arm.com
249    //        /help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf
250    AAPCSABIBuiltinVaList,
251
252    // typedef struct __va_list_tag
253    //   {
254    //     long __gpr;
255    //     long __fpr;
256    //     void *__overflow_arg_area;
257    //     void *__reg_save_area;
258    //   } va_list[1];
259    SystemZBuiltinVaList
260  };
261
262protected:
263  /// Specify if mangling based on address space map should be used or
264  /// not for language specific address spaces
265  bool UseAddrSpaceMapMangling;
266
267public:
268  IntType getSizeType() const { return SizeType; }
269  IntType getSignedSizeType() const {
270    switch (SizeType) {
271    case UnsignedShort:
272      return SignedShort;
273    case UnsignedInt:
274      return SignedInt;
275    case UnsignedLong:
276      return SignedLong;
277    case UnsignedLongLong:
278      return SignedLongLong;
279    default:
280      llvm_unreachable("Invalid SizeType");
281    }
282  }
283  IntType getIntMaxType() const { return IntMaxType; }
284  IntType getUIntMaxType() const {
285    return getCorrespondingUnsignedType(IntMaxType);
286  }
287  IntType getPtrDiffType(unsigned AddrSpaceconst {
288    return AddrSpace == 0 ? PtrDiffType : getPtrDiffTypeV(AddrSpace);
289  }
290  IntType getUnsignedPtrDiffType(unsigned AddrSpaceconst {
291    return getCorrespondingUnsignedType(getPtrDiffType(AddrSpace));
292  }
293  IntType getIntPtrType() const { return IntPtrType; }
294  IntType getUIntPtrType() const {
295    return getCorrespondingUnsignedType(IntPtrType);
296  }
297  IntType getWCharType() const { return WCharType; }
298  IntType getWIntType() const { return WIntType; }
299  IntType getChar16Type() const { return Char16Type; }
300  IntType getChar32Type() const { return Char32Type; }
301  IntType getInt64Type() const { return Int64Type; }
302  IntType getUInt64Type() const {
303    return getCorrespondingUnsignedType(Int64Type);
304  }
305  IntType getSigAtomicType() const { return SigAtomicType; }
306  IntType getProcessIDType() const { return ProcessIDType; }
307
308  static IntType getCorrespondingUnsignedType(IntType T) {
309    switch (T) {
310    case SignedChar:
311      return UnsignedChar;
312    case SignedShort:
313      return UnsignedShort;
314    case SignedInt:
315      return UnsignedInt;
316    case SignedLong:
317      return UnsignedLong;
318    case SignedLongLong:
319      return UnsignedLongLong;
320    default:
321      llvm_unreachable("Unexpected signed integer type");
322    }
323  }
324
325  /// In the event this target uses the same number of fractional bits for its
326  /// unsigned types as it does with its signed counterparts, there will be
327  /// exactly one bit of padding.
328  /// Return true if unsigned fixed point types have padding for this target.
329  bool doUnsignedFixedPointTypesHavePadding() const {
330    return PaddingOnUnsignedFixedPoint;
331  }
332
333  /// Return the width (in bits) of the specified integer type enum.
334  ///
335  /// For example, SignedInt -> getIntWidth().
336  unsigned getTypeWidth(IntType Tconst;
337
338  /// Return integer type with specified width.
339  virtual IntType getIntTypeByWidth(unsigned BitWidthbool IsSignedconst;
340
341  /// Return the smallest integer type with at least the specified width.
342  virtual IntType getLeastIntTypeByWidth(unsigned BitWidth,
343                                         bool IsSignedconst;
344
345  /// Return floating point type with specified width.
346  RealType getRealTypeByWidth(unsigned BitWidthconst;
347
348  /// Return the alignment (in bits) of the specified integer type enum.
349  ///
350  /// For example, SignedInt -> getIntAlign().
351  unsigned getTypeAlign(IntType Tconst;
352
353  /// Returns true if the type is signed; false otherwise.
354  static bool isTypeSigned(IntType T);
355
356  /// Return the width of pointers on this target, for the
357  /// specified address space.
358  uint64_t getPointerWidth(unsigned AddrSpaceconst {
359    return AddrSpace == 0 ? PointerWidth : getPointerWidthV(AddrSpace);
360  }
361  uint64_t getPointerAlign(unsigned AddrSpaceconst {
362    return AddrSpace == 0 ? PointerAlign : getPointerAlignV(AddrSpace);
363  }
364
365  /// Return the maximum width of pointers on this target.
366  virtual uint64_t getMaxPointerWidth() const {
367    return PointerWidth;
368  }
369
370  /// Get integer value for null pointer.
371  /// \param AddrSpace address space of pointee in source language.
372  virtual uint64_t getNullPointerValue(LangAS AddrSpaceconst { return 0; }
373
374  /// Return the size of '_Bool' and C++ 'bool' for this target, in bits.
375  unsigned getBoolWidth() const { return BoolWidth; }
376
377  /// Return the alignment of '_Bool' and C++ 'bool' for this target.
378  unsigned getBoolAlign() const { return BoolAlign; }
379
380  unsigned getCharWidth() const { return 8; } // FIXME
381  unsigned getCharAlign() const { return 8; } // FIXME
382
383  /// Return the size of 'signed short' and 'unsigned short' for this
384  /// target, in bits.
385  unsigned getShortWidth() const { return 16; } // FIXME
386
387  /// Return the alignment of 'signed short' and 'unsigned short' for
388  /// this target.
389  unsigned getShortAlign() const { return 16; } // FIXME
390
391  /// getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for
392  /// this target, in bits.
393  unsigned getIntWidth() const { return IntWidth; }
394  unsigned getIntAlign() const { return IntAlign; }
395
396  /// getLongWidth/Align - Return the size of 'signed long' and 'unsigned long'
397  /// for this target, in bits.
398  unsigned getLongWidth() const { return LongWidth; }
399  unsigned getLongAlign() const { return LongAlign; }
400
401  /// getLongLongWidth/Align - Return the size of 'signed long long' and
402  /// 'unsigned long long' for this target, in bits.
403  unsigned getLongLongWidth() const { return LongLongWidth; }
404  unsigned getLongLongAlign() const { return LongLongAlign; }
405
406  /// getShortAccumWidth/Align - Return the size of 'signed short _Accum' and
407  /// 'unsigned short _Accum' for this target, in bits.
408  unsigned getShortAccumWidth() const { return ShortAccumWidth; }
409  unsigned getShortAccumAlign() const { return ShortAccumAlign; }
410
411  /// getAccumWidth/Align - Return the size of 'signed _Accum' and
412  /// 'unsigned _Accum' for this target, in bits.
413  unsigned getAccumWidth() const { return AccumWidth; }
414  unsigned getAccumAlign() const { return AccumAlign; }
415
416  /// getLongAccumWidth/Align - Return the size of 'signed long _Accum' and
417  /// 'unsigned long _Accum' for this target, in bits.
418  unsigned getLongAccumWidth() const { return LongAccumWidth; }
419  unsigned getLongAccumAlign() const { return LongAccumAlign; }
420
421  /// getShortFractWidth/Align - Return the size of 'signed short _Fract' and
422  /// 'unsigned short _Fract' for this target, in bits.
423  unsigned getShortFractWidth() const { return ShortFractWidth; }
424  unsigned getShortFractAlign() const { return ShortFractAlign; }
425
426  /// getFractWidth/Align - Return the size of 'signed _Fract' and
427  /// 'unsigned _Fract' for this target, in bits.
428  unsigned getFractWidth() const { return FractWidth; }
429  unsigned getFractAlign() const { return FractAlign; }
430
431  /// getLongFractWidth/Align - Return the size of 'signed long _Fract' and
432  /// 'unsigned long _Fract' for this target, in bits.
433  unsigned getLongFractWidth() const { return LongFractWidth; }
434  unsigned getLongFractAlign() const { return LongFractAlign; }
435
436  /// getShortAccumScale/IBits - Return the number of fractional/integral bits
437  /// in a 'signed short _Accum' type.
438  unsigned getShortAccumScale() const { return ShortAccumScale; }
439  unsigned getShortAccumIBits() const {
440    return ShortAccumWidth - ShortAccumScale - 1;
441  }
442
443  /// getAccumScale/IBits - Return the number of fractional/integral bits
444  /// in a 'signed _Accum' type.
445  unsigned getAccumScale() const { return AccumScale; }
446  unsigned getAccumIBits() const { return AccumWidth - AccumScale - 1; }
447
448  /// getLongAccumScale/IBits - Return the number of fractional/integral bits
449  /// in a 'signed long _Accum' type.
450  unsigned getLongAccumScale() const { return LongAccumScale; }
451  unsigned getLongAccumIBits() const {
452    return LongAccumWidth - LongAccumScale - 1;
453  }
454
455  /// getUnsignedShortAccumScale/IBits - Return the number of
456  /// fractional/integral bits in a 'unsigned short _Accum' type.
457  unsigned getUnsignedShortAccumScale() const {
458    return PaddingOnUnsignedFixedPoint ? ShortAccumScale : ShortAccumScale + 1;
459  }
460  unsigned getUnsignedShortAccumIBits() const {
461    return PaddingOnUnsignedFixedPoint
462               ? getShortAccumIBits()
463               : ShortAccumWidth - getUnsignedShortAccumScale();
464  }
465
466  /// getUnsignedAccumScale/IBits - Return the number of fractional/integral
467  /// bits in a 'unsigned _Accum' type.
468  unsigned getUnsignedAccumScale() const {
469    return PaddingOnUnsignedFixedPoint ? AccumScale : AccumScale + 1;
470  }
471  unsigned getUnsignedAccumIBits() const {
472    return PaddingOnUnsignedFixedPoint ? getAccumIBits()
473                                       : AccumWidth - getUnsignedAccumScale();
474  }
475
476  /// getUnsignedLongAccumScale/IBits - Return the number of fractional/integral
477  /// bits in a 'unsigned long _Accum' type.
478  unsigned getUnsignedLongAccumScale() const {
479    return PaddingOnUnsignedFixedPoint ? LongAccumScale : LongAccumScale + 1;
480  }
481  unsigned getUnsignedLongAccumIBits() const {
482    return PaddingOnUnsignedFixedPoint
483               ? getLongAccumIBits()
484               : LongAccumWidth - getUnsignedLongAccumScale();
485  }
486
487  /// getShortFractScale - Return the number of fractional bits
488  /// in a 'signed short _Fract' type.
489  unsigned getShortFractScale() const { return ShortFractWidth - 1; }
490
491  /// getFractScale - Return the number of fractional bits
492  /// in a 'signed _Fract' type.
493  unsigned getFractScale() const { return FractWidth - 1; }
494
495  /// getLongFractScale - Return the number of fractional bits
496  /// in a 'signed long _Fract' type.
497  unsigned getLongFractScale() const { return LongFractWidth - 1; }
498
499  /// getUnsignedShortFractScale - Return the number of fractional bits
500  /// in a 'unsigned short _Fract' type.
501  unsigned getUnsignedShortFractScale() const {
502    return PaddingOnUnsignedFixedPoint ? getShortFractScale()
503                                       : getShortFractScale() + 1;
504  }
505
506  /// getUnsignedFractScale - Return the number of fractional bits
507  /// in a 'unsigned _Fract' type.
508  unsigned getUnsignedFractScale() const {
509    return PaddingOnUnsignedFixedPoint ? getFractScale() : getFractScale() + 1;
510  }
511
512  /// getUnsignedLongFractScale - Return the number of fractional bits
513  /// in a 'unsigned long _Fract' type.
514  unsigned getUnsignedLongFractScale() const {
515    return PaddingOnUnsignedFixedPoint ? getLongFractScale()
516                                       : getLongFractScale() + 1;
517  }
518
519  /// Determine whether the __int128 type is supported on this target.
520  virtual bool hasInt128Type() const {
521    return (getPointerWidth(0) >= 64) || getTargetOpts().ForceEnableInt128;
522  } // FIXME
523
524  /// Determine whether _Float16 is supported on this target.
525  virtual bool hasLegalHalfType() const { return HasLegalHalfType; }
526
527  /// Determine whether the __float128 type is supported on this target.
528  virtual bool hasFloat128Type() const { return HasFloat128; }
529
530  /// Determine whether the _Float16 type is supported on this target.
531  virtual bool hasFloat16Type() const { return HasFloat16; }
532
533  /// Return the alignment that is suitable for storing any
534  /// object with a fundamental alignment requirement.
535  unsigned getSuitableAlign() const { return SuitableAlign; }
536
537  /// Return the default alignment for __attribute__((aligned)) on
538  /// this target, to be used if no alignment value is specified.
539  unsigned getDefaultAlignForAttributeAligned() const {
540    return DefaultAlignForAttributeAligned;
541  }
542
543  /// getMinGlobalAlign - Return the minimum alignment of a global variable,
544  /// unless its alignment is explicitly reduced via attributes.
545  unsigned getMinGlobalAlign() const { return MinGlobalAlign; }
546
547  /// Return the largest alignment for which a suitably-sized allocation with
548  /// '::operator new(size_t)' is guaranteed to produce a correctly-aligned
549  /// pointer.
550  unsigned getNewAlign() const {
551    return NewAlign ? NewAlign : std::max(LongDoubleAlignLongLongAlign);
552  }
553
554  /// getWCharWidth/Align - Return the size of 'wchar_t' for this target, in
555  /// bits.
556  unsigned getWCharWidth() const { return getTypeWidth(WCharType); }
557  unsigned getWCharAlign() const { return getTypeAlign(WCharType); }
558
559  /// getChar16Width/Align - Return the size of 'char16_t' for this target, in
560  /// bits.
561  unsigned getChar16Width() const { return getTypeWidth(Char16Type); }
562  unsigned getChar16Align() const { return getTypeAlign(Char16Type); }
563
564  /// getChar32Width/Align - Return the size of 'char32_t' for this target, in
565  /// bits.
566  unsigned getChar32Width() const { return getTypeWidth(Char32Type); }
567  unsigned getChar32Align() const { return getTypeAlign(Char32Type); }
568
569  /// getHalfWidth/Align/Format - Return the size/align/format of 'half'.
570  unsigned getHalfWidth() const { return HalfWidth; }
571  unsigned getHalfAlign() const { return HalfAlign; }
572  const llvm::fltSemantics &getHalfFormat() const { return *HalfFormat; }
573
574  /// getFloatWidth/Align/Format - Return the size/align/format of 'float'.
575  unsigned getFloatWidth() const { return FloatWidth; }
576  unsigned getFloatAlign() const { return FloatAlign; }
577  const llvm::fltSemantics &getFloatFormat() const { return *FloatFormat; }
578
579  /// getDoubleWidth/Align/Format - Return the size/align/format of 'double'.
580  unsigned getDoubleWidth() const { return DoubleWidth; }
581  unsigned getDoubleAlign() const { return DoubleAlign; }
582  const llvm::fltSemantics &getDoubleFormat() const { return *DoubleFormat; }
583
584  /// getLongDoubleWidth/Align/Format - Return the size/align/format of 'long
585  /// double'.
586  unsigned getLongDoubleWidth() const { return LongDoubleWidth; }
587  unsigned getLongDoubleAlign() const { return LongDoubleAlign; }
588  const llvm::fltSemantics &getLongDoubleFormat() const {
589    return *LongDoubleFormat;
590  }
591
592  /// getFloat128Width/Align/Format - Return the size/align/format of
593  /// '__float128'.
594  unsigned getFloat128Width() const { return 128; }
595  unsigned getFloat128Align() const { return Float128Align; }
596  const llvm::fltSemantics &getFloat128Format() const {
597    return *Float128Format;
598  }
599
600  /// Return true if the 'long double' type should be mangled like
601  /// __float128.
602  virtual bool useFloat128ManglingForLongDouble() const { return false; }
603
604  /// Return the value for the C99 FLT_EVAL_METHOD macro.
605  virtual unsigned getFloatEvalMethod() const { return 0; }
606
607  // getLargeArrayMinWidth/Align - Return the minimum array size that is
608  // 'large' and its alignment.
609  unsigned getLargeArrayMinWidth() const { return LargeArrayMinWidth; }
610  unsigned getLargeArrayAlign() const { return LargeArrayAlign; }
611
612  /// Return the maximum width lock-free atomic operation which will
613  /// ever be supported for the given target
614  unsigned getMaxAtomicPromoteWidth() const { return MaxAtomicPromoteWidth; }
615  /// Return the maximum width lock-free atomic operation which can be
616  /// inlined given the supported features of the given target.
617  unsigned getMaxAtomicInlineWidth() const { return MaxAtomicInlineWidth; }
618  /// Set the maximum inline or promote width lock-free atomic operation
619  /// for the given target.
620  virtual void setMaxAtomicWidth() {}
621  /// Returns true if the given target supports lock-free atomic
622  /// operations at the specified width and alignment.
623  virtual bool hasBuiltinAtomic(uint64_t AtomicSizeInBits,
624                                uint64_t AlignmentInBitsconst {
625    return AtomicSizeInBits <= AlignmentInBits &&
626           AtomicSizeInBits <= getMaxAtomicInlineWidth() &&
627           (AtomicSizeInBits <= getCharWidth() ||
628            llvm::isPowerOf2_64(AtomicSizeInBits / getCharWidth()));
629  }
630
631  /// Return the maximum vector alignment supported for the given target.
632  unsigned getMaxVectorAlign() const { return MaxVectorAlign; }
633  /// Return default simd alignment for the given target. Generally, this
634  /// value is type-specific, but this alignment can be used for most of the
635  /// types for the given target.
636  unsigned getSimdDefaultAlign() const { return SimdDefaultAlign; }
637
638  /// Return the size of intmax_t and uintmax_t for this target, in bits.
639  unsigned getIntMaxTWidth() const {
640    return getTypeWidth(IntMaxType);
641  }
642
643  // Return the size of unwind_word for this target.
644  virtual unsigned getUnwindWordWidth() const { return getPointerWidth(0); }
645
646  /// Return the "preferred" register width on this target.
647  virtual unsigned getRegisterWidth() const {
648    // Currently we assume the register width on the target matches the pointer
649    // width, we can introduce a new variable for this if/when some target wants
650    // it.
651    return PointerWidth;
652  }
653
654  /// Returns the name of the mcount instrumentation function.
655  const char *getMCountName() const {
656    return MCountName;
657  }
658
659  /// Check if the Objective-C built-in boolean type should be signed
660  /// char.
661  ///
662  /// Otherwise, if this returns false, the normal built-in boolean type
663  /// should also be used for Objective-C.
664  bool useSignedCharForObjCBool() const {
665    return UseSignedCharForObjCBool;
666  }
667  void noSignedCharForObjCBool() {
668    UseSignedCharForObjCBool = false;
669  }
670
671  /// Check whether the alignment of bit-field types is respected
672  /// when laying out structures.
673  bool useBitFieldTypeAlignment() const {
674    return UseBitFieldTypeAlignment;
675  }
676
677  /// Check whether zero length bitfields should force alignment of
678  /// the next member.
679  bool useZeroLengthBitfieldAlignment() const {
680    return UseZeroLengthBitfieldAlignment;
681  }
682
683  /// Get the fixed alignment value in bits for a member that follows
684  /// a zero length bitfield.
685  unsigned getZeroLengthBitfieldBoundary() const {
686    return ZeroLengthBitfieldBoundary;
687  }
688
689  /// Check whether explicit bitfield alignment attributes should be
690  //  honored, as in "__attribute__((aligned(2))) int b : 1;".
691  bool useExplicitBitFieldAlignment() const {
692    return UseExplicitBitFieldAlignment;
693  }
694
695  /// Check whether this target support '\#pragma options align=mac68k'.
696  bool hasAlignMac68kSupport() const {
697    return HasAlignMac68kSupport;
698  }
699
700  /// Return the user string for the specified integer type enum.
701  ///
702  /// For example, SignedShort -> "short".
703  static const char *getTypeName(IntType T);
704
705  /// Return the constant suffix for the specified integer type enum.
706  ///
707  /// For example, SignedLong -> "L".
708  const char *getTypeConstantSuffix(IntType Tconst;
709
710  /// Return the printf format modifier for the specified
711  /// integer type enum.
712  ///
713  /// For example, SignedLong -> "l".
714  static const char *getTypeFormatModifier(IntType T);
715
716  /// Check whether the given real type should use the "fpret" flavor of
717  /// Objective-C message passing on this target.
718  bool useObjCFPRetForRealType(RealType Tconst {
719    return RealTypeUsesObjCFPRet & (1 << T);
720  }
721
722  /// Check whether _Complex long double should use the "fp2ret" flavor
723  /// of Objective-C message passing on this target.
724  bool useObjCFP2RetForComplexLongDouble() const {
725    return ComplexLongDoubleUsesFP2Ret;
726  }
727
728  /// Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used
729  /// to convert to and from __fp16.
730  /// FIXME: This function should be removed once all targets stop using the
731  /// conversion intrinsics.
732  virtual bool useFP16ConversionIntrinsics() const {
733    return true;
734  }
735
736  /// Specify if mangling based on address space map should be used or
737  /// not for language specific address spaces
738  bool useAddressSpaceMapMangling() const {
739    return UseAddrSpaceMapMangling;
740  }
741
742  ///===---- Other target property query methods --------------------------===//
743
744  /// Appends the target-specific \#define values for this
745  /// target set to the specified buffer.
746  virtual void getTargetDefines(const LangOptions &Opts,
747                                MacroBuilder &Builderconst = 0;
748
749
750  /// Return information about target-specific builtins for
751  /// the current primary target, and info about which builtins are non-portable
752  /// across the current set of primary and secondary targets.
753  virtual ArrayRef<Builtin::InfogetTargetBuiltins() const = 0;
754
755  /// The __builtin_clz* and __builtin_ctz* built-in
756  /// functions are specified to have undefined results for zero inputs, but
757  /// on targets that support these operations in a way that provides
758  /// well-defined results for zero without loss of performance, it is a good
759  /// idea to avoid optimizing based on that undef behavior.
760  virtual bool isCLZForZeroUndef() const { return true; }
761
762  /// Returns the kind of __builtin_va_list type that should be used
763  /// with this target.
764  virtual BuiltinVaListKind getBuiltinVaListKind() const = 0;
765
766  /// Returns whether or not type \c __builtin_ms_va_list type is
767  /// available on this target.
768  bool hasBuiltinMSVaList() const { return HasBuiltinMSVaList; }
769
770  /// Returns true for RenderScript.
771  bool isRenderScriptTarget() const { return IsRenderScriptTarget; }
772
773  /// Returns whether the passed in string is a valid clobber in an
774  /// inline asm statement.
775  ///
776  /// This is used by Sema.
777  bool isValidClobber(StringRef Nameconst;
778
779  /// Returns whether the passed in string is a valid register name
780  /// according to GCC.
781  ///
782  /// This is used by Sema for inline asm statements.
783  virtual bool isValidGCCRegisterName(StringRef Nameconst;
784
785  /// Returns the "normalized" GCC register name.
786  ///
787  /// ReturnCannonical true will return the register name without any additions
788  /// such as "{}" or "%" in it's canonical form, for example:
789  /// ReturnCanonical = true and Name = "rax", will return "ax".
790  StringRef getNormalizedGCCRegisterName(StringRef Name,
791                                         bool ReturnCanonical = falseconst;
792
793  /// Extracts a register from the passed constraint (if it is a
794  /// single-register constraint) and the asm label expression related to a
795  /// variable in the input or output list of an inline asm statement.
796  ///
797  /// This function is used by Sema in order to diagnose conflicts between
798  /// the clobber list and the input/output lists.
799  virtual StringRef getConstraintRegister(StringRef Constraint,
800                                          StringRef Expressionconst {
801    return "";
802  }
803
804  struct ConstraintInfo {
805    enum {
806      CI_None = 0x00,
807      CI_AllowsMemory = 0x01,
808      CI_AllowsRegister = 0x02,
809      CI_ReadWrite = 0x04,         // "+r" output constraint (read and write).
810      CI_HasMatchingInput = 0x08,  // This output operand has a matching input.
811      CI_ImmediateConstant = 0x10// This operand must be an immediate constant
812      CI_EarlyClobber = 0x20,      // "&" output constraint (early clobber).
813    };
814    unsigned Flags;
815    int TiedOperand;
816    struct {
817      int Min;
818      int Max;
819      bool isConstrained;
820    } ImmRange;
821    llvm::SmallSet<int4ImmSet;
822
823    std::string ConstraintStr;  // constraint: "=rm"
824    std::string Name;           // Operand name: [foo] with no []'s.
825  public:
826    ConstraintInfo(StringRef ConstraintStrStringRef Name)
827        : Flags(0), TiedOperand(-1), ConstraintStr(ConstraintStr.str()),
828          Name(Name.str()) {
829      ImmRange.Min = ImmRange.Max = 0;
830      ImmRange.isConstrained = false;
831    }
832
833    const std::string &getConstraintStr() const { return ConstraintStr; }
834    const std::string &getName() const { return Name; }
835    bool isReadWrite() const { return (Flags & CI_ReadWrite) != 0; }
836    bool earlyClobber() { return (Flags & CI_EarlyClobber) != 0; }
837    bool allowsRegister() const { return (Flags & CI_AllowsRegister) != 0; }
838    bool allowsMemory() const { return (Flags & CI_AllowsMemory) != 0; }
839
840    /// Return true if this output operand has a matching
841    /// (tied) input operand.
842    bool hasMatchingInput() const { return (Flags & CI_HasMatchingInput) != 0; }
843
844    /// Return true if this input operand is a matching
845    /// constraint that ties it to an output operand.
846    ///
847    /// If this returns true then getTiedOperand will indicate which output
848    /// operand this is tied to.
849    bool hasTiedOperand() const { return TiedOperand != -1; }
850    unsigned getTiedOperand() const {
851       (0) . __assert_fail ("hasTiedOperand() && \"Has no tied operand!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/Basic/TargetInfo.h", 851, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(hasTiedOperand() && "Has no tied operand!");
852      return (unsigned)TiedOperand;
853    }
854
855    bool requiresImmediateConstant() const {
856      return (Flags & CI_ImmediateConstant) != 0;
857    }
858    bool isValidAsmImmediate(const llvm::APInt &Valueconst {
859      if (!ImmSet.empty())
860        return Value.isSignedIntN(32) &&
861               ImmSet.count(Value.getZExtValue()) != 0;
862      return !ImmRange.isConstrained ||
863             (Value.sge(ImmRange.Min) && Value.sle(ImmRange.Max));
864    }
865
866    void setIsReadWrite() { Flags |= CI_ReadWrite; }
867    void setEarlyClobber() { Flags |= CI_EarlyClobber; }
868    void setAllowsMemory() { Flags |= CI_AllowsMemory; }
869    void setAllowsRegister() { Flags |= CI_AllowsRegister; }
870    void setHasMatchingInput() { Flags |= CI_HasMatchingInput; }
871    void setRequiresImmediate(int Minint Max) {
872      Flags |= CI_ImmediateConstant;
873      ImmRange.Min = Min;
874      ImmRange.Max = Max;
875      ImmRange.isConstrained = true;
876    }
877    void setRequiresImmediate(llvm::ArrayRef<intExacts) {
878      Flags |= CI_ImmediateConstant;
879      for (int Exact : Exacts)
880        ImmSet.insert(Exact);
881    }
882    void setRequiresImmediate(int Exact) {
883      Flags |= CI_ImmediateConstant;
884      ImmSet.insert(Exact);
885    }
886    void setRequiresImmediate() {
887      Flags |= CI_ImmediateConstant;
888    }
889
890    /// Indicate that this is an input operand that is tied to
891    /// the specified output operand.
892    ///
893    /// Copy over the various constraint information from the output.
894    void setTiedOperand(unsigned NConstraintInfo &Output) {
895      Output.setHasMatchingInput();
896      Flags = Output.Flags;
897      TiedOperand = N;
898      // Don't copy Name or constraint string.
899    }
900  };
901
902  /// Validate register name used for global register variables.
903  ///
904  /// This function returns true if the register passed in RegName can be used
905  /// for global register variables on this target. In addition, it returns
906  /// true in HasSizeMismatch if the size of the register doesn't match the
907  /// variable size passed in RegSize.
908  virtual bool validateGlobalRegisterVariable(StringRef RegName,
909                                              unsigned RegSize,
910                                              bool &HasSizeMismatchconst {
911    HasSizeMismatch = false;
912    return true;
913  }
914
915  // validateOutputConstraint, validateInputConstraint - Checks that
916  // a constraint is valid and provides information about it.
917  // FIXME: These should return a real error instead of just true/false.
918  bool validateOutputConstraint(ConstraintInfo &Infoconst;
919  bool validateInputConstraint(MutableArrayRef<ConstraintInfoOutputConstraints,
920                               ConstraintInfo &infoconst;
921
922  virtual bool validateOutputSize(StringRef /*Constraint*/,
923                                  unsigned /*Size*/const {
924    return true;
925  }
926
927  virtual bool validateInputSize(StringRef /*Constraint*/,
928                                 unsigned /*Size*/const {
929    return true;
930  }
931  virtual bool
932  validateConstraintModifier(StringRef /*Constraint*/,
933                             char /*Modifier*/,
934                             unsigned /*Size*/,
935                             std::string &/*SuggestedModifier*/const {
936    return true;
937  }
938  virtual bool
939  validateAsmConstraint(const char *&Name,
940                        TargetInfo::ConstraintInfo &infoconst = 0;
941
942  bool resolveSymbolicName(const char *&Name,
943                           ArrayRef<ConstraintInfoOutputConstraints,
944                           unsigned &Indexconst;
945
946  // Constraint parm will be left pointing at the last character of
947  // the constraint.  In practice, it won't be changed unless the
948  // constraint is longer than one character.
949  virtual std::string convertConstraint(const char *&Constraintconst {
950    // 'p' defaults to 'r', but can be overridden by targets.
951    if (*Constraint == 'p')
952      return std::string("r");
953    return std::string(1, *Constraint);
954  }
955
956  /// Returns a string of target-specific clobbers, in LLVM format.
957  virtual const char *getClobbers() const = 0;
958
959  /// Returns true if NaN encoding is IEEE 754-2008.
960  /// Only MIPS allows a different encoding.
961  virtual bool isNan2008() const {
962    return true;
963  }
964
965  /// Returns the target triple of the primary target.
966  const llvm::Triple &getTriple() const {
967    return Triple;
968  }
969
970  const llvm::DataLayout &getDataLayout() const {
971     (0) . __assert_fail ("DataLayout && \"Uninitialized DataLayout!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/Basic/TargetInfo.h", 971, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(DataLayout && "Uninitialized DataLayout!");
972    return *DataLayout;
973  }
974
975  struct GCCRegAlias {
976    const char * const Aliases[5];
977    const char * const Register;
978  };
979
980  struct AddlRegName {
981    const char * const Names[5];
982    const unsigned RegNum;
983  };
984
985  /// Does this target support "protected" visibility?
986  ///
987  /// Any target which dynamic libraries will naturally support
988  /// something like "default" (meaning that the symbol is visible
989  /// outside this shared object) and "hidden" (meaning that it isn't)
990  /// visibilities, but "protected" is really an ELF-specific concept
991  /// with weird semantics designed around the convenience of dynamic
992  /// linker implementations.  Which is not to suggest that there's
993  /// consistent target-independent semantics for "default" visibility
994  /// either; the entire thing is pretty badly mangled.
995  virtual bool hasProtectedVisibility() const { return true; }
996
997  /// An optional hook that targets can implement to perform semantic
998  /// checking on attribute((section("foo"))) specifiers.
999  ///
1000  /// In this case, "foo" is passed in to be checked.  If the section
1001  /// specifier is invalid, the backend should return a non-empty string
1002  /// that indicates the problem.
1003  ///
1004  /// This hook is a simple quality of implementation feature to catch errors
1005  /// and give good diagnostics in cases when the assembler or code generator
1006  /// would otherwise reject the section specifier.
1007  ///
1008  virtual std::string isValidSectionSpecifier(StringRef SRconst {
1009    return "";
1010  }
1011
1012  /// Set forced language options.
1013  ///
1014  /// Apply changes to the target information with respect to certain
1015  /// language options which change the target configuration and adjust
1016  /// the language based on the target options where applicable.
1017  virtual void adjust(LangOptions &Opts);
1018
1019  /// Adjust target options based on codegen options.
1020  virtual void adjustTargetOptions(const CodeGenOptions &CGOpts,
1021                                   TargetOptions &TargetOptsconst {}
1022
1023  /// Initialize the map with the default set of target features for the
1024  /// CPU this should include all legal feature strings on the target.
1025  ///
1026  /// \return False on error (invalid features).
1027  virtual bool initFeatureMap(llvm::StringMap<bool> &Features,
1028                              DiagnosticsEngine &DiagsStringRef CPU,
1029                              const std::vector<std::string> &FeatureVecconst;
1030
1031  /// Get the ABI currently in use.
1032  virtual StringRef getABI() const { return StringRef(); }
1033
1034  /// Get the C++ ABI currently in use.
1035  TargetCXXABI getCXXABI() const {
1036    return TheCXXABI;
1037  }
1038
1039  /// Target the specified CPU.
1040  ///
1041  /// \return  False on error (invalid CPU name).
1042  virtual bool setCPU(const std::string &Name) {
1043    return false;
1044  }
1045
1046  /// Fill a SmallVectorImpl with the valid values to setCPU.
1047  virtual void fillValidCPUList(SmallVectorImpl<StringRef> &Valuesconst {}
1048
1049  /// brief Determine whether this TargetInfo supports the given CPU name.
1050  virtual bool isValidCPUName(StringRef Nameconst {
1051    return true;
1052  }
1053
1054  /// Use the specified ABI.
1055  ///
1056  /// \return False on error (invalid ABI name).
1057  virtual bool setABI(const std::string &Name) {
1058    return false;
1059  }
1060
1061  /// Use the specified unit for FP math.
1062  ///
1063  /// \return False on error (invalid unit name).
1064  virtual bool setFPMath(StringRef Name) {
1065    return false;
1066  }
1067
1068  /// Enable or disable a specific target feature;
1069  /// the feature name must be valid.
1070  virtual void setFeatureEnabled(llvm::StringMap<bool> &Features,
1071                                 StringRef Name,
1072                                 bool Enabledconst {
1073    Features[Name] = Enabled;
1074  }
1075
1076  /// Determine whether this TargetInfo supports the given feature.
1077  virtual bool isValidFeatureName(StringRef Featureconst {
1078    return true;
1079  }
1080
1081  /// Perform initialization based on the user configured
1082  /// set of features (e.g., +sse4).
1083  ///
1084  /// The list is guaranteed to have at most one entry per feature.
1085  ///
1086  /// The target may modify the features list, to change which options are
1087  /// passed onwards to the backend.
1088  /// FIXME: This part should be fixed so that we can change handleTargetFeatures
1089  /// to merely a TargetInfo initialization routine.
1090  ///
1091  /// \return  False on error.
1092  virtual bool handleTargetFeatures(std::vector<std::string> &Features,
1093                                    DiagnosticsEngine &Diags) {
1094    return true;
1095  }
1096
1097  /// Determine whether the given target has the given feature.
1098  virtual bool hasFeature(StringRef Featureconst {
1099    return false;
1100  }
1101
1102  /// Identify whether this target supports multiversioning of functions,
1103  /// which requires support for cpu_supports and cpu_is functionality.
1104  bool supportsMultiVersioning() const {
1105    return getTriple().getArch() == llvm::Triple::x86 ||
1106           getTriple().getArch() == llvm::Triple::x86_64;
1107  }
1108
1109  /// Identify whether this target supports IFuncs.
1110  bool supportsIFunc() const { return getTriple().isOSBinFormatELF(); }
1111
1112  // Validate the contents of the __builtin_cpu_supports(const char*)
1113  // argument.
1114  virtual bool validateCpuSupports(StringRef Nameconst { return false; }
1115
1116  // Return the target-specific priority for features/cpus/vendors so
1117  // that they can be properly sorted for checking.
1118  virtual unsigned multiVersionSortPriority(StringRef Nameconst {
1119    return 0;
1120  }
1121
1122  // Validate the contents of the __builtin_cpu_is(const char*)
1123  // argument.
1124  virtual bool validateCpuIs(StringRef Nameconst { return false; }
1125
1126  // Validate a cpu_dispatch/cpu_specific CPU option, which is a different list
1127  // from cpu_is, since it checks via features rather than CPUs directly.
1128  virtual bool validateCPUSpecificCPUDispatch(StringRef Nameconst {
1129    return false;
1130  }
1131
1132  // Get the character to be added for mangling purposes for cpu_specific.
1133  virtual char CPUSpecificManglingCharacter(StringRef Nameconst {
1134    llvm_unreachable(
1135        "cpu_specific Multiversioning not implemented on this target");
1136  }
1137
1138  // Get a list of the features that make up the CPU option for
1139  // cpu_specific/cpu_dispatch so that it can be passed to llvm as optimization
1140  // options.
1141  virtual void getCPUSpecificCPUDispatchFeatures(
1142      StringRef Namellvm::SmallVectorImpl<StringRef> &Featuresconst {
1143    llvm_unreachable(
1144        "cpu_specific Multiversioning not implemented on this target");
1145  }
1146
1147  // Returns maximal number of args passed in registers.
1148  unsigned getRegParmMax() const {
1149     (0) . __assert_fail ("RegParmMax < 7 && \"RegParmMax value is larger than AST can handle\"", "/home/seafit/code_projects/clang_source/clang/include/clang/Basic/TargetInfo.h", 1149, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(RegParmMax < 7 && "RegParmMax value is larger than AST can handle");
1150    return RegParmMax;
1151  }
1152
1153  /// Whether the target supports thread-local storage.
1154  bool isTLSSupported() const {
1155    return TLSSupported;
1156  }
1157
1158  /// Return the maximum alignment (in bits) of a TLS variable
1159  ///
1160  /// Gets the maximum alignment (in bits) of a TLS variable on this target.
1161  /// Returns zero if there is no such constraint.
1162  unsigned short getMaxTLSAlign() const {
1163    return MaxTLSAlign;
1164  }
1165
1166  /// Whether target supports variable-length arrays.
1167  bool isVLASupported() const { return VLASupported; }
1168
1169  /// Whether the target supports SEH __try.
1170  bool isSEHTrySupported() const {
1171    return getTriple().isOSWindows() &&
1172           (getTriple().getArch() == llvm::Triple::x86 ||
1173            getTriple().getArch() == llvm::Triple::x86_64 ||
1174            getTriple().getArch() == llvm::Triple::aarch64);
1175  }
1176
1177  /// Return true if {|} are normal characters in the asm string.
1178  ///
1179  /// If this returns false (the default), then {abc|xyz} is syntax
1180  /// that says that when compiling for asm variant #0, "abc" should be
1181  /// generated, but when compiling for asm variant #1, "xyz" should be
1182  /// generated.
1183  bool hasNoAsmVariants() const {
1184    return NoAsmVariants;
1185  }
1186
1187  /// Return the register number that __builtin_eh_return_regno would
1188  /// return with the specified argument.
1189  /// This corresponds with TargetLowering's getExceptionPointerRegister
1190  /// and getExceptionSelectorRegister in the backend.
1191  virtual int getEHDataRegisterNumber(unsigned RegNoconst {
1192    return -1;
1193  }
1194
1195  /// Return the section to use for C++ static initialization functions.
1196  virtual const char *getStaticInitSectionSpecifier() const {
1197    return nullptr;
1198  }
1199
1200  const LangASMap &getAddressSpaceMap() const { return *AddrSpaceMap; }
1201
1202  /// Map from the address space field in builtin description strings to the
1203  /// language address space.
1204  virtual LangAS getOpenCLBuiltinAddressSpace(unsigned ASconst {
1205    return getLangASFromTargetAS(AS);
1206  }
1207
1208  /// Map from the address space field in builtin description strings to the
1209  /// language address space.
1210  virtual LangAS getCUDABuiltinAddressSpace(unsigned ASconst {
1211    return getLangASFromTargetAS(AS);
1212  }
1213
1214  /// Return an AST address space which can be used opportunistically
1215  /// for constant global memory. It must be possible to convert pointers into
1216  /// this address space to LangAS::Default. If no such address space exists,
1217  /// this may return None, and such optimizations will be disabled.
1218  virtual llvm::Optional<LangASgetConstantAddressSpace() const {
1219    return LangAS::Default;
1220  }
1221
1222  /// Retrieve the name of the platform as it is used in the
1223  /// availability attribute.
1224  StringRef getPlatformName() const { return PlatformName; }
1225
1226  /// Retrieve the minimum desired version of the platform, to
1227  /// which the program should be compiled.
1228  VersionTuple getPlatformMinVersion() const { return PlatformMinVersion; }
1229
1230  bool isBigEndian() const { return BigEndian; }
1231  bool isLittleEndian() const { return !BigEndian; }
1232
1233  enum CallingConvMethodType {
1234    CCMT_Unknown,
1235    CCMT_Member,
1236    CCMT_NonMember
1237  };
1238
1239  /// Gets the default calling convention for the given target and
1240  /// declaration context.
1241  virtual CallingConv getDefaultCallingConv(CallingConvMethodType MTconst {
1242    // Not all targets will specify an explicit calling convention that we can
1243    // express.  This will always do the right thing, even though it's not
1244    // an explicit calling convention.
1245    return CC_C;
1246  }
1247
1248  enum CallingConvCheckResult {
1249    CCCR_OK,
1250    CCCR_Warning,
1251    CCCR_Ignore,
1252  };
1253
1254  /// Determines whether a given calling convention is valid for the
1255  /// target. A calling convention can either be accepted, produce a warning
1256  /// and be substituted with the default calling convention, or (someday)
1257  /// produce an error (such as using thiscall on a non-instance function).
1258  virtual CallingConvCheckResult checkCallingConvention(CallingConv CCconst {
1259    switch (CC) {
1260      default:
1261        return CCCR_Warning;
1262      case CC_C:
1263        return CCCR_OK;
1264    }
1265  }
1266
1267  enum CallingConvKind {
1268    CCK_Default,
1269    CCK_ClangABI4OrPS4,
1270    CCK_MicrosoftWin64
1271  };
1272
1273  virtual CallingConvKind getCallingConvKind(bool ClangABICompat4const;
1274
1275  /// Controls if __builtin_longjmp / __builtin_setjmp can be lowered to
1276  /// llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp.
1277  virtual bool hasSjLjLowering() const {
1278    return false;
1279  }
1280
1281  /// Check if the target supports CFProtection branch.
1282  virtual bool
1283  checkCFProtectionBranchSupported(DiagnosticsEngine &Diagsconst;
1284
1285  /// Check if the target supports CFProtection branch.
1286  virtual bool
1287  checkCFProtectionReturnSupported(DiagnosticsEngine &Diagsconst;
1288
1289  /// Whether target allows to overalign ABI-specified preferred alignment
1290  virtual bool allowsLargerPreferedTypeAlignment() const { return true; }
1291
1292  /// Set supported OpenCL extensions and optional core features.
1293  virtual void setSupportedOpenCLOpts() {}
1294
1295  /// Set supported OpenCL extensions as written on command line
1296  virtual void setOpenCLExtensionOpts() {
1297    for (const auto &Ext : getTargetOpts().OpenCLExtensionsAsWritten) {
1298      getTargetOpts().SupportedOpenCLOptions.support(Ext);
1299    }
1300  }
1301
1302  /// Get supported OpenCL extensions and optional core features.
1303  OpenCLOptions &getSupportedOpenCLOpts() {
1304    return getTargetOpts().SupportedOpenCLOptions;
1305  }
1306
1307  /// Get const supported OpenCL extensions and optional core features.
1308  const OpenCLOptions &getSupportedOpenCLOpts() const {
1309      return getTargetOpts().SupportedOpenCLOptions;
1310  }
1311
1312  enum OpenCLTypeKind {
1313    OCLTK_Default,
1314    OCLTK_ClkEvent,
1315    OCLTK_Event,
1316    OCLTK_Image,
1317    OCLTK_Pipe,
1318    OCLTK_Queue,
1319    OCLTK_ReserveID,
1320    OCLTK_Sampler,
1321  };
1322
1323  /// Get address space for OpenCL type.
1324  virtual LangAS getOpenCLTypeAddrSpace(OpenCLTypeKind TKconst;
1325
1326  /// \returns Target specific vtbl ptr address space.
1327  virtual unsigned getVtblPtrAddressSpace() const {
1328    return 0;
1329  }
1330
1331  /// \returns If a target requires an address within a target specific address
1332  /// space \p AddressSpace to be converted in order to be used, then return the
1333  /// corresponding target specific DWARF address space.
1334  ///
1335  /// \returns Otherwise return None and no conversion will be emitted in the
1336  /// DWARF.
1337  virtual Optional<unsignedgetDWARFAddressSpace(unsigned AddressSpaceconst {
1338    return None;
1339  }
1340
1341  /// \returns The version of the SDK which was used during the compilation if
1342  /// one was specified, or an empty version otherwise.
1343  const llvm::VersionTuple &getSDKVersion() const {
1344    return getTargetOpts().SDKVersion;
1345  }
1346
1347  /// Check the target is valid after it is fully initialized.
1348  virtual bool validateTarget(DiagnosticsEngine &Diagsconst {
1349    return true;
1350  }
1351
1352  virtual void setAuxTarget(const TargetInfo *Aux) {}
1353
1354protected:
1355  /// Copy type and layout related info.
1356  void copyAuxTarget(const TargetInfo *Aux);
1357  virtual uint64_t getPointerWidthV(unsigned AddrSpaceconst {
1358    return PointerWidth;
1359  }
1360  virtual uint64_t getPointerAlignV(unsigned AddrSpaceconst {
1361    return PointerAlign;
1362  }
1363  virtual enum IntType getPtrDiffTypeV(unsigned AddrSpaceconst {
1364    return PtrDiffType;
1365  }
1366  virtual ArrayRef<const char *> getGCCRegNames() const = 0;
1367  virtual ArrayRef<GCCRegAliasgetGCCRegAliases() const = 0;
1368  virtual ArrayRef<AddlRegNamegetGCCAddlRegNames() const {
1369    return None;
1370  }
1371
1372 private:
1373  // Assert the values for the fractional and integral bits for each fixed point
1374  // type follow the restrictions given in clause 6.2.6.3 of N1169.
1375  void CheckFixedPointBits() const;
1376};
1377
1378}  // end namespace clang
1379
1380#endif
1381
clang::TransferrableTargetInfo::PointerWidth
clang::TransferrableTargetInfo::PointerAlign
clang::TransferrableTargetInfo::BoolWidth
clang::TransferrableTargetInfo::BoolAlign
clang::TransferrableTargetInfo::IntWidth
clang::TransferrableTargetInfo::IntAlign
clang::TransferrableTargetInfo::HalfWidth
clang::TransferrableTargetInfo::HalfAlign
clang::TransferrableTargetInfo::FloatWidth
clang::TransferrableTargetInfo::FloatAlign
clang::TransferrableTargetInfo::DoubleWidth
clang::TransferrableTargetInfo::DoubleAlign
clang::TransferrableTargetInfo::LongDoubleWidth
clang::TransferrableTargetInfo::LongDoubleAlign
clang::TransferrableTargetInfo::Float128Align
clang::TransferrableTargetInfo::LargeArrayMinWidth
clang::TransferrableTargetInfo::LargeArrayAlign
clang::TransferrableTargetInfo::LongWidth
clang::TransferrableTargetInfo::LongAlign
clang::TransferrableTargetInfo::LongLongWidth
clang::TransferrableTargetInfo::LongLongAlign
clang::TransferrableTargetInfo::ShortAccumWidth
clang::TransferrableTargetInfo::ShortAccumAlign
clang::TransferrableTargetInfo::AccumWidth
clang::TransferrableTargetInfo::AccumAlign
clang::TransferrableTargetInfo::LongAccumWidth
clang::TransferrableTargetInfo::LongAccumAlign
clang::TransferrableTargetInfo::ShortFractWidth
clang::TransferrableTargetInfo::ShortFractAlign
clang::TransferrableTargetInfo::FractWidth
clang::TransferrableTargetInfo::FractAlign
clang::TransferrableTargetInfo::LongFractWidth
clang::TransferrableTargetInfo::LongFractAlign
clang::TransferrableTargetInfo::PaddingOnUnsignedFixedPoint
clang::TransferrableTargetInfo::ShortAccumScale
clang::TransferrableTargetInfo::AccumScale
clang::TransferrableTargetInfo::LongAccumScale
clang::TransferrableTargetInfo::SuitableAlign
clang::TransferrableTargetInfo::DefaultAlignForAttributeAligned
clang::TransferrableTargetInfo::MinGlobalAlign
clang::TransferrableTargetInfo::NewAlign
clang::TransferrableTargetInfo::MaxVectorAlign
clang::TransferrableTargetInfo::MaxTLSAlign
clang::TransferrableTargetInfo::HalfFormat
clang::TransferrableTargetInfo::FloatFormat
clang::TransferrableTargetInfo::DoubleFormat
clang::TransferrableTargetInfo::LongDoubleFormat
clang::TransferrableTargetInfo::Float128Format
clang::TransferrableTargetInfo::IntType
clang::TransferrableTargetInfo::RealType
clang::TransferrableTargetInfo::SizeType
clang::TransferrableTargetInfo::IntMaxType
clang::TransferrableTargetInfo::PtrDiffType
clang::TransferrableTargetInfo::IntPtrType
clang::TransferrableTargetInfo::WCharType
clang::TransferrableTargetInfo::WIntType
clang::TransferrableTargetInfo::Char16Type
clang::TransferrableTargetInfo::Char32Type
clang::TransferrableTargetInfo::Int64Type
clang::TransferrableTargetInfo::SigAtomicType
clang::TransferrableTargetInfo::ProcessIDType
clang::TransferrableTargetInfo::UseSignedCharForObjCBool
clang::TransferrableTargetInfo::UseBitFieldTypeAlignment
clang::TransferrableTargetInfo::UseZeroLengthBitfieldAlignment
clang::TransferrableTargetInfo::UseExplicitBitFieldAlignment
clang::TransferrableTargetInfo::ZeroLengthBitfieldBoundary
clang::TargetInfo::TargetOpts
clang::TargetInfo::Triple
clang::TargetInfo::BigEndian
clang::TargetInfo::TLSSupported
clang::TargetInfo::VLASupported
clang::TargetInfo::NoAsmVariants
clang::TargetInfo::HasLegalHalfType
clang::TargetInfo::HasFloat128
clang::TargetInfo::HasFloat16
clang::TargetInfo::MaxAtomicPromoteWidth
clang::TargetInfo::MaxAtomicInlineWidth
clang::TargetInfo::SimdDefaultAlign
clang::TargetInfo::DataLayout
clang::TargetInfo::MCountName
clang::TargetInfo::RegParmMax
clang::TargetInfo::SSERegParmMax
clang::TargetInfo::TheCXXABI
clang::TargetInfo::AddrSpaceMap
clang::TargetInfo::PlatformName
clang::TargetInfo::PlatformMinVersion
clang::TargetInfo::HasAlignMac68kSupport
clang::TargetInfo::RealTypeUsesObjCFPRet
clang::TargetInfo::ComplexLongDoubleUsesFP2Ret
clang::TargetInfo::HasBuiltinMSVaList
clang::TargetInfo::IsRenderScriptTarget
clang::TargetInfo::resetDataLayout
clang::TargetInfo::CreateTargetInfo
clang::TargetInfo::getTargetOpts
clang::TargetInfo::BuiltinVaListKind
clang::TargetInfo::UseAddrSpaceMapMangling
clang::TargetInfo::getSizeType
clang::TargetInfo::getSignedSizeType
clang::TargetInfo::getIntMaxType
clang::TargetInfo::getUIntMaxType
clang::TargetInfo::getPtrDiffType
clang::TargetInfo::getUnsignedPtrDiffType
clang::TargetInfo::getIntPtrType
clang::TargetInfo::getUIntPtrType
clang::TargetInfo::getWCharType
clang::TargetInfo::getWIntType
clang::TargetInfo::getChar16Type
clang::TargetInfo::getChar32Type
clang::TargetInfo::getInt64Type
clang::TargetInfo::getUInt64Type
clang::TargetInfo::getSigAtomicType
clang::TargetInfo::getProcessIDType
clang::TargetInfo::getCorrespondingUnsignedType
clang::TargetInfo::doUnsignedFixedPointTypesHavePadding
clang::TargetInfo::getTypeWidth
clang::TargetInfo::getIntTypeByWidth
clang::TargetInfo::getLeastIntTypeByWidth
clang::TargetInfo::getRealTypeByWidth
clang::TargetInfo::getTypeAlign
clang::TargetInfo::isTypeSigned
clang::TargetInfo::getPointerWidth
clang::TargetInfo::getPointerAlign
clang::TargetInfo::getMaxPointerWidth
clang::TargetInfo::getNullPointerValue
clang::TargetInfo::getBoolWidth
clang::TargetInfo::getBoolAlign
clang::TargetInfo::getCharWidth
clang::TargetInfo::getCharAlign
clang::TargetInfo::getShortWidth
clang::TargetInfo::getShortAlign
clang::TargetInfo::getIntWidth
clang::TargetInfo::getIntAlign
clang::TargetInfo::getLongWidth
clang::TargetInfo::getLongAlign
clang::TargetInfo::getLongLongWidth
clang::TargetInfo::getLongLongAlign
clang::TargetInfo::getShortAccumWidth
clang::TargetInfo::getShortAccumAlign
clang::TargetInfo::getAccumWidth
clang::TargetInfo::getAccumAlign
clang::TargetInfo::getLongAccumWidth
clang::TargetInfo::getLongAccumAlign
clang::TargetInfo::getShortFractWidth
clang::TargetInfo::getShortFractAlign
clang::TargetInfo::getFractWidth
clang::TargetInfo::getFractAlign
clang::TargetInfo::getLongFractWidth
clang::TargetInfo::getLongFractAlign
clang::TargetInfo::getShortAccumScale
clang::TargetInfo::getShortAccumIBits
clang::TargetInfo::getAccumScale
clang::TargetInfo::getAccumIBits
clang::TargetInfo::getLongAccumScale
clang::TargetInfo::getLongAccumIBits
clang::TargetInfo::getUnsignedShortAccumScale
clang::TargetInfo::getUnsignedShortAccumIBits
clang::TargetInfo::getUnsignedAccumScale
clang::TargetInfo::getUnsignedAccumIBits
clang::TargetInfo::getUnsignedLongAccumScale
clang::TargetInfo::getUnsignedLongAccumIBits
clang::TargetInfo::getShortFractScale
clang::TargetInfo::getFractScale
clang::TargetInfo::getLongFractScale
clang::TargetInfo::getUnsignedShortFractScale
clang::TargetInfo::getUnsignedFractScale
clang::TargetInfo::getUnsignedLongFractScale
clang::TargetInfo::hasInt128Type
clang::TargetInfo::hasLegalHalfType
clang::TargetInfo::hasFloat128Type
clang::TargetInfo::hasFloat16Type
clang::TargetInfo::getSuitableAlign
clang::TargetInfo::getDefaultAlignForAttributeAligned
clang::TargetInfo::getMinGlobalAlign
clang::TargetInfo::getNewAlign
clang::TargetInfo::getWCharWidth
clang::TargetInfo::getWCharAlign
clang::TargetInfo::getChar16Width
clang::TargetInfo::getChar16Align
clang::TargetInfo::getChar32Width
clang::TargetInfo::getChar32Align
clang::TargetInfo::getHalfWidth
clang::TargetInfo::getHalfAlign
clang::TargetInfo::getHalfFormat
clang::TargetInfo::getFloatWidth
clang::TargetInfo::getFloatAlign
clang::TargetInfo::getFloatFormat
clang::TargetInfo::getDoubleWidth
clang::TargetInfo::getDoubleAlign
clang::TargetInfo::getDoubleFormat
clang::TargetInfo::getLongDoubleWidth
clang::TargetInfo::getLongDoubleAlign
clang::TargetInfo::getLongDoubleFormat
clang::TargetInfo::getFloat128Width
clang::TargetInfo::getFloat128Align
clang::TargetInfo::getFloat128Format
clang::TargetInfo::useFloat128ManglingForLongDouble
clang::TargetInfo::getFloatEvalMethod
clang::TargetInfo::getLargeArrayMinWidth
clang::TargetInfo::getLargeArrayAlign
clang::TargetInfo::getMaxAtomicPromoteWidth
clang::TargetInfo::getMaxAtomicInlineWidth
clang::TargetInfo::setMaxAtomicWidth
clang::TargetInfo::hasBuiltinAtomic
clang::TargetInfo::getMaxVectorAlign
clang::TargetInfo::getSimdDefaultAlign
clang::TargetInfo::getIntMaxTWidth
clang::TargetInfo::getUnwindWordWidth
clang::TargetInfo::getRegisterWidth
clang::TargetInfo::getMCountName
clang::TargetInfo::useSignedCharForObjCBool
clang::TargetInfo::noSignedCharForObjCBool
clang::TargetInfo::useBitFieldTypeAlignment
clang::TargetInfo::useZeroLengthBitfieldAlignment
clang::TargetInfo::getZeroLengthBitfieldBoundary
clang::TargetInfo::useExplicitBitFieldAlignment
clang::TargetInfo::hasAlignMac68kSupport
clang::TargetInfo::getTypeName
clang::TargetInfo::getTypeConstantSuffix
clang::TargetInfo::getTypeFormatModifier
clang::TargetInfo::useObjCFPRetForRealType
clang::TargetInfo::useObjCFP2RetForComplexLongDouble
clang::TargetInfo::useFP16ConversionIntrinsics
clang::TargetInfo::useAddressSpaceMapMangling
clang::TargetInfo::getTargetDefines
clang::TargetInfo::getTargetBuiltins
clang::TargetInfo::isCLZForZeroUndef
clang::TargetInfo::getBuiltinVaListKind
clang::TargetInfo::hasBuiltinMSVaList
clang::TargetInfo::isRenderScriptTarget
clang::TargetInfo::isValidClobber
clang::TargetInfo::isValidGCCRegisterName
clang::TargetInfo::getNormalizedGCCRegisterName
clang::TargetInfo::getConstraintRegister
clang::TargetInfo::ConstraintInfo
clang::TargetInfo::ConstraintInfo::Flags
clang::TargetInfo::ConstraintInfo::TiedOperand
clang::TargetInfo::ConstraintInfo::(anonymous struct)::Min
clang::TargetInfo::ConstraintInfo::(anonymous struct)::Max
clang::TargetInfo::ConstraintInfo::(anonymous struct)::isConstrained
clang::TargetInfo::ConstraintInfo::ImmRange
clang::TargetInfo::ConstraintInfo::ImmSet
clang::TargetInfo::ConstraintInfo::ConstraintStr
clang::TargetInfo::ConstraintInfo::Name
clang::TargetInfo::ConstraintInfo::getConstraintStr
clang::TargetInfo::ConstraintInfo::getName
clang::TargetInfo::ConstraintInfo::isReadWrite
clang::TargetInfo::ConstraintInfo::earlyClobber
clang::TargetInfo::ConstraintInfo::allowsRegister
clang::TargetInfo::ConstraintInfo::allowsMemory
clang::TargetInfo::ConstraintInfo::hasMatchingInput
clang::TargetInfo::ConstraintInfo::hasTiedOperand
clang::TargetInfo::ConstraintInfo::getTiedOperand
clang::TargetInfo::ConstraintInfo::requiresImmediateConstant
clang::TargetInfo::ConstraintInfo::isValidAsmImmediate
clang::TargetInfo::ConstraintInfo::setIsReadWrite
clang::TargetInfo::ConstraintInfo::setEarlyClobber
clang::TargetInfo::ConstraintInfo::setAllowsMemory
clang::TargetInfo::ConstraintInfo::setAllowsRegister
clang::TargetInfo::ConstraintInfo::setHasMatchingInput
clang::TargetInfo::ConstraintInfo::setRequiresImmediate
clang::TargetInfo::ConstraintInfo::setRequiresImmediate
clang::TargetInfo::ConstraintInfo::setRequiresImmediate
clang::TargetInfo::ConstraintInfo::setRequiresImmediate
clang::TargetInfo::ConstraintInfo::setTiedOperand
clang::TargetInfo::validateGlobalRegisterVariable
clang::TargetInfo::validateOutputConstraint
clang::TargetInfo::validateInputConstraint
clang::TargetInfo::validateOutputSize
clang::TargetInfo::validateInputSize
clang::TargetInfo::validateConstraintModifier
clang::TargetInfo::validateAsmConstraint
clang::TargetInfo::resolveSymbolicName
clang::TargetInfo::convertConstraint
clang::TargetInfo::getClobbers
clang::TargetInfo::isNan2008
clang::TargetInfo::getTriple
clang::TargetInfo::getDataLayout
clang::TargetInfo::GCCRegAlias
clang::TargetInfo::GCCRegAlias::Aliases
clang::TargetInfo::GCCRegAlias::Register
clang::TargetInfo::AddlRegName
clang::TargetInfo::AddlRegName::Names
clang::TargetInfo::AddlRegName::RegNum
clang::TargetInfo::hasProtectedVisibility
clang::TargetInfo::isValidSectionSpecifier
clang::TargetInfo::adjust
clang::TargetInfo::adjustTargetOptions
clang::TargetInfo::initFeatureMap
clang::TargetInfo::getABI
clang::TargetInfo::getCXXABI
clang::TargetInfo::setCPU
clang::TargetInfo::fillValidCPUList
clang::TargetInfo::isValidCPUName
clang::TargetInfo::setABI
clang::TargetInfo::setFPMath
clang::TargetInfo::setFeatureEnabled
clang::TargetInfo::isValidFeatureName
clang::TargetInfo::handleTargetFeatures
clang::TargetInfo::hasFeature
clang::TargetInfo::supportsMultiVersioning
clang::TargetInfo::supportsIFunc
clang::TargetInfo::validateCpuSupports
clang::TargetInfo::multiVersionSortPriority
clang::TargetInfo::validateCpuIs
clang::TargetInfo::validateCPUSpecificCPUDispatch
clang::TargetInfo::CPUSpecificManglingCharacter
clang::TargetInfo::getCPUSpecificCPUDispatchFeatures
clang::TargetInfo::getRegParmMax
clang::TargetInfo::isTLSSupported
clang::TargetInfo::getMaxTLSAlign
clang::TargetInfo::isVLASupported
clang::TargetInfo::isSEHTrySupported
clang::TargetInfo::hasNoAsmVariants
clang::TargetInfo::getEHDataRegisterNumber
clang::TargetInfo::getStaticInitSectionSpecifier
clang::TargetInfo::getAddressSpaceMap
clang::TargetInfo::getOpenCLBuiltinAddressSpace
clang::TargetInfo::getCUDABuiltinAddressSpace
clang::TargetInfo::getConstantAddressSpace
clang::TargetInfo::getPlatformName
clang::TargetInfo::getPlatformMinVersion
clang::TargetInfo::isBigEndian
clang::TargetInfo::isLittleEndian
clang::TargetInfo::CallingConvMethodType
clang::TargetInfo::getDefaultCallingConv
clang::TargetInfo::CallingConvCheckResult
clang::TargetInfo::checkCallingConvention
clang::TargetInfo::CallingConvKind
clang::TargetInfo::getCallingConvKind
clang::TargetInfo::hasSjLjLowering
clang::TargetInfo::checkCFProtectionBranchSupported
clang::TargetInfo::checkCFProtectionReturnSupported
clang::TargetInfo::allowsLargerPreferedTypeAlignment
clang::TargetInfo::setSupportedOpenCLOpts
clang::TargetInfo::setOpenCLExtensionOpts
clang::TargetInfo::getSupportedOpenCLOpts
clang::TargetInfo::getSupportedOpenCLOpts
clang::TargetInfo::OpenCLTypeKind
clang::TargetInfo::getOpenCLTypeAddrSpace
clang::TargetInfo::getVtblPtrAddressSpace
clang::TargetInfo::getDWARFAddressSpace
clang::TargetInfo::getSDKVersion
clang::TargetInfo::validateTarget
clang::TargetInfo::setAuxTarget
clang::TargetInfo::copyAuxTarget
clang::TargetInfo::getPointerWidthV
clang::TargetInfo::getPointerAlignV
clang::TargetInfo::getPtrDiffTypeV
clang::TargetInfo::getGCCRegNames
clang::TargetInfo::getGCCRegAliases
clang::TargetInfo::getGCCAddlRegNames
clang::TargetInfo::CheckFixedPointBits
clang::TargetInfo::CreateTargetInfo
clang::TargetInfo::ConstraintInfo::isValidAsmImmediate