clang  19.0.0git
TargetInfo.cpp
Go to the documentation of this file.
1 //===--- TargetInfo.cpp - Information about Target machine ----------------===//
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 implements the TargetInfo interface.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "clang/Basic/TargetInfo.h"
15 #include "clang/Basic/CharInfo.h"
16 #include "clang/Basic/Diagnostic.h"
19 #include "llvm/ADT/APFloat.h"
20 #include "llvm/ADT/STLExtras.h"
21 #include "llvm/Support/ErrorHandling.h"
22 #include "llvm/TargetParser/TargetParser.h"
23 #include <cstdlib>
24 using namespace clang;
25 
26 static const LangASMap DefaultAddrSpaceMap = {0};
27 // The fake address space map must have a distinct entry for each
28 // language-specific address space.
29 static const LangASMap FakeAddrSpaceMap = {
30  0, // Default
31  1, // opencl_global
32  3, // opencl_local
33  2, // opencl_constant
34  0, // opencl_private
35  4, // opencl_generic
36  5, // opencl_global_device
37  6, // opencl_global_host
38  7, // cuda_device
39  8, // cuda_constant
40  9, // cuda_shared
41  1, // sycl_global
42  5, // sycl_global_device
43  6, // sycl_global_host
44  3, // sycl_local
45  0, // sycl_private
46  10, // ptr32_sptr
47  11, // ptr32_uptr
48  12, // ptr64
49  13, // hlsl_groupshared
50  20, // wasm_funcref
51 };
52 
53 // TargetInfo Constructor.
54 TargetInfo::TargetInfo(const llvm::Triple &T) : Triple(T) {
55  // Set defaults. Defaults are set for a 32-bit RISC platform, like PPC or
56  // SPARC. These should be overridden by concrete targets as needed.
57  BigEndian = !T.isLittleEndian();
58  TLSSupported = true;
59  VLASupported = true;
60  NoAsmVariants = false;
61  HasLegalHalfType = false;
62  HalfArgsAndReturns = false;
63  HasFloat128 = false;
64  HasIbm128 = false;
65  HasFloat16 = false;
66  HasBFloat16 = false;
67  HasFullBFloat16 = false;
68  HasLongDouble = true;
69  HasFPReturn = true;
70  HasStrictFP = false;
72  BoolWidth = BoolAlign = 8;
73  IntWidth = IntAlign = 32;
74  LongWidth = LongAlign = 32;
76  Int128Align = 128;
77 
78  // Fixed point default bit widths
80  AccumWidth = AccumAlign = 32;
83  FractWidth = FractAlign = 16;
85 
86  // Fixed point default integral and fractional bit sizes
87  // We give the _Accum 1 fewer fractional bits than their corresponding _Fract
88  // types by default to have the same number of fractional bits between _Accum
89  // and _Fract types.
91  ShortAccumScale = 7;
92  AccumScale = 15;
93  LongAccumScale = 31;
94 
95  SuitableAlign = 64;
97  MinGlobalAlign = 0;
98  // From the glibc documentation, on GNU systems, malloc guarantees 16-byte
99  // alignment on 64-bit systems and 8-byte alignment on 32-bit systems. See
100  // https://www.gnu.org/software/libc/manual/html_node/Malloc-Examples.html.
101  // This alignment guarantee also applies to Windows and Android. On Darwin
102  // and OpenBSD, the alignment is 16 bytes on both 64-bit and 32-bit systems.
103  if (T.isGNUEnvironment() || T.isWindowsMSVCEnvironment() || T.isAndroid() ||
104  T.isOHOSFamily())
105  NewAlign = Triple.isArch64Bit() ? 128 : Triple.isArch32Bit() ? 64 : 0;
106  else if (T.isOSDarwin() || T.isOSOpenBSD())
107  NewAlign = 128;
108  else
109  NewAlign = 0; // Infer from basic type alignment.
110  HalfWidth = 16;
111  HalfAlign = 16;
112  FloatWidth = 32;
113  FloatAlign = 32;
114  DoubleWidth = 64;
115  DoubleAlign = 64;
116  LongDoubleWidth = 64;
117  LongDoubleAlign = 64;
118  Float128Align = 128;
119  Ibm128Align = 128;
120  LargeArrayMinWidth = 0;
121  LargeArrayAlign = 0;
123  MaxVectorAlign = 0;
124  MaxTLSAlign = 0;
144  HalfFormat = &llvm::APFloat::IEEEhalf();
145  FloatFormat = &llvm::APFloat::IEEEsingle();
146  DoubleFormat = &llvm::APFloat::IEEEdouble();
147  LongDoubleFormat = &llvm::APFloat::IEEEdouble();
148  Float128Format = &llvm::APFloat::IEEEquad();
149  Ibm128Format = &llvm::APFloat::PPCDoubleDouble();
150  MCountName = "mcount";
151  UserLabelPrefix = "_";
152  RegParmMax = 0;
153  SSERegParmMax = 0;
154  HasAlignMac68kSupport = false;
155  HasBuiltinMSVaList = false;
156  IsRenderScriptTarget = false;
157  HasAArch64SVETypes = false;
158  HasRISCVVTypes = false;
160  HasUnalignedAccess = false;
161  ARMCDECoprocMask = 0;
162 
163  // Default to no types using fpret.
165 
166  // Default to not using fp2ret for __Complex long double
168 
169  // Set the C++ ABI based on the triple.
170  TheCXXABI.set(Triple.isKnownWindowsMSVCEnvironment()
171  ? TargetCXXABI::Microsoft
172  : TargetCXXABI::GenericItanium);
173 
174  // Default to an empty address space map.
176  UseAddrSpaceMapMangling = false;
177 
178  // Default to an unknown platform name.
179  PlatformName = "unknown";
180  PlatformMinVersion = VersionTuple();
181 
182  MaxOpenCLWorkGroupSize = 1024;
183 
184  MaxBitIntWidth.reset();
185 }
186 
187 // Out of line virtual dtor for TargetInfo.
189 
190 void TargetInfo::resetDataLayout(StringRef DL, const char *ULP) {
191  DataLayoutString = DL.str();
192  UserLabelPrefix = ULP;
193 }
194 
195 bool
197  Diags.Report(diag::err_opt_not_valid_on_target) << "cf-protection=branch";
198  return false;
199 }
200 
201 bool
203  Diags.Report(diag::err_opt_not_valid_on_target) << "cf-protection=return";
204  return false;
205 }
206 
207 /// getTypeName - Return the user string for the specified integer type enum.
208 /// For example, SignedShort -> "short".
210  switch (T) {
211  default: llvm_unreachable("not an integer!");
212  case SignedChar: return "signed char";
213  case UnsignedChar: return "unsigned char";
214  case SignedShort: return "short";
215  case UnsignedShort: return "unsigned short";
216  case SignedInt: return "int";
217  case UnsignedInt: return "unsigned int";
218  case SignedLong: return "long int";
219  case UnsignedLong: return "long unsigned int";
220  case SignedLongLong: return "long long int";
221  case UnsignedLongLong: return "long long unsigned int";
222  }
223 }
224 
225 /// getTypeConstantSuffix - Return the constant suffix for the specified
226 /// integer type enum. For example, SignedLong -> "L".
228  switch (T) {
229  default: llvm_unreachable("not an integer!");
230  case SignedChar:
231  case SignedShort:
232  case SignedInt: return "";
233  case SignedLong: return "L";
234  case SignedLongLong: return "LL";
235  case UnsignedChar:
236  if (getCharWidth() < getIntWidth())
237  return "";
238  [[fallthrough]];
239  case UnsignedShort:
240  if (getShortWidth() < getIntWidth())
241  return "";
242  [[fallthrough]];
243  case UnsignedInt: return "U";
244  case UnsignedLong: return "UL";
245  case UnsignedLongLong: return "ULL";
246  }
247 }
248 
249 /// getTypeFormatModifier - Return the printf format modifier for the
250 /// specified integer type enum. For example, SignedLong -> "l".
251 
253  switch (T) {
254  default: llvm_unreachable("not an integer!");
255  case SignedChar:
256  case UnsignedChar: return "hh";
257  case SignedShort:
258  case UnsignedShort: return "h";
259  case SignedInt:
260  case UnsignedInt: return "";
261  case SignedLong:
262  case UnsignedLong: return "l";
263  case SignedLongLong:
264  case UnsignedLongLong: return "ll";
265  }
266 }
267 
268 /// getTypeWidth - Return the width (in bits) of the specified integer type
269 /// enum. For example, SignedInt -> getIntWidth().
271  switch (T) {
272  default: llvm_unreachable("not an integer!");
273  case SignedChar:
274  case UnsignedChar: return getCharWidth();
275  case SignedShort:
276  case UnsignedShort: return getShortWidth();
277  case SignedInt:
278  case UnsignedInt: return getIntWidth();
279  case SignedLong:
280  case UnsignedLong: return getLongWidth();
281  case SignedLongLong:
282  case UnsignedLongLong: return getLongLongWidth();
283  };
284 }
285 
287  unsigned BitWidth, bool IsSigned) const {
288  if (getCharWidth() == BitWidth)
289  return IsSigned ? SignedChar : UnsignedChar;
290  if (getShortWidth() == BitWidth)
291  return IsSigned ? SignedShort : UnsignedShort;
292  if (getIntWidth() == BitWidth)
293  return IsSigned ? SignedInt : UnsignedInt;
294  if (getLongWidth() == BitWidth)
295  return IsSigned ? SignedLong : UnsignedLong;
296  if (getLongLongWidth() == BitWidth)
297  return IsSigned ? SignedLongLong : UnsignedLongLong;
298  return NoInt;
299 }
300 
302  bool IsSigned) const {
303  if (getCharWidth() >= BitWidth)
304  return IsSigned ? SignedChar : UnsignedChar;
305  if (getShortWidth() >= BitWidth)
306  return IsSigned ? SignedShort : UnsignedShort;
307  if (getIntWidth() >= BitWidth)
308  return IsSigned ? SignedInt : UnsignedInt;
309  if (getLongWidth() >= BitWidth)
310  return IsSigned ? SignedLong : UnsignedLong;
311  if (getLongLongWidth() >= BitWidth)
312  return IsSigned ? SignedLongLong : UnsignedLongLong;
313  return NoInt;
314 }
315 
317  FloatModeKind ExplicitType) const {
318  if (getHalfWidth() == BitWidth)
319  return FloatModeKind::Half;
320  if (getFloatWidth() == BitWidth)
321  return FloatModeKind::Float;
322  if (getDoubleWidth() == BitWidth)
323  return FloatModeKind::Double;
324 
325  switch (BitWidth) {
326  case 96:
327  if (&getLongDoubleFormat() == &llvm::APFloat::x87DoubleExtended())
329  break;
330  case 128:
331  // The caller explicitly asked for an IEEE compliant type but we still
332  // have to check if the target supports it.
333  if (ExplicitType == FloatModeKind::Float128)
336  if (ExplicitType == FloatModeKind::Ibm128)
339  if (&getLongDoubleFormat() == &llvm::APFloat::PPCDoubleDouble() ||
340  &getLongDoubleFormat() == &llvm::APFloat::IEEEquad())
342  if (hasFloat128Type())
344  break;
345  }
346 
347  return FloatModeKind::NoFloat;
348 }
349 
350 /// getTypeAlign - Return the alignment (in bits) of the specified integer type
351 /// enum. For example, SignedInt -> getIntAlign().
353  switch (T) {
354  default: llvm_unreachable("not an integer!");
355  case SignedChar:
356  case UnsignedChar: return getCharAlign();
357  case SignedShort:
358  case UnsignedShort: return getShortAlign();
359  case SignedInt:
360  case UnsignedInt: return getIntAlign();
361  case SignedLong:
362  case UnsignedLong: return getLongAlign();
363  case SignedLongLong:
364  case UnsignedLongLong: return getLongLongAlign();
365  };
366 }
367 
368 /// isTypeSigned - Return whether an integer types is signed. Returns true if
369 /// the type is signed; false otherwise.
371  switch (T) {
372  default: llvm_unreachable("not an integer!");
373  case SignedChar:
374  case SignedShort:
375  case SignedInt:
376  case SignedLong:
377  case SignedLongLong:
378  return true;
379  case UnsignedChar:
380  case UnsignedShort:
381  case UnsignedInt:
382  case UnsignedLong:
383  case UnsignedLongLong:
384  return false;
385  };
386 }
387 
388 /// adjust - Set forced language options.
389 /// Apply changes to the target information with respect to certain
390 /// language options which change the target configuration and adjust
391 /// the language based on the target options where applicable.
393  if (Opts.NoBitFieldTypeAlign)
394  UseBitFieldTypeAlignment = false;
395 
396  switch (Opts.WCharSize) {
397  default: llvm_unreachable("invalid wchar_t width");
398  case 0: break;
399  case 1: WCharType = Opts.WCharIsSigned ? SignedChar : UnsignedChar; break;
400  case 2: WCharType = Opts.WCharIsSigned ? SignedShort : UnsignedShort; break;
401  case 4: WCharType = Opts.WCharIsSigned ? SignedInt : UnsignedInt; break;
402  }
403 
404  if (Opts.AlignDouble) {
405  DoubleAlign = LongLongAlign = 64;
406  LongDoubleAlign = 64;
407  }
408 
409  // HLSL explicitly defines the sizes and formats of some data types, and we
410  // need to conform to those regardless of what architecture you are targeting.
411  if (Opts.HLSL) {
412  LongWidth = LongAlign = 64;
413  if (!Opts.NativeHalfType) {
414  HalfFormat = &llvm::APFloat::IEEEsingle();
415  HalfWidth = HalfAlign = 32;
416  }
417  }
418 
419  if (Opts.OpenCL) {
420  // OpenCL C requires specific widths for types, irrespective of
421  // what these normally are for the target.
422  // We also define long long and long double here, although the
423  // OpenCL standard only mentions these as "reserved".
424  IntWidth = IntAlign = 32;
425  LongWidth = LongAlign = 64;
427  HalfWidth = HalfAlign = 16;
428  FloatWidth = FloatAlign = 32;
429 
430  // Embedded 32-bit targets (OpenCL EP) might have double C type
431  // defined as float. Let's not override this as it might lead
432  // to generating illegal code that uses 64bit doubles.
433  if (DoubleWidth != FloatWidth) {
434  DoubleWidth = DoubleAlign = 64;
435  DoubleFormat = &llvm::APFloat::IEEEdouble();
436  }
438 
439  unsigned MaxPointerWidth = getMaxPointerWidth();
440  assert(MaxPointerWidth == 32 || MaxPointerWidth == 64);
441  bool Is32BitArch = MaxPointerWidth == 32;
442  SizeType = Is32BitArch ? UnsignedInt : UnsignedLong;
443  PtrDiffType = Is32BitArch ? SignedInt : SignedLong;
444  IntPtrType = Is32BitArch ? SignedInt : SignedLong;
445 
448 
449  HalfFormat = &llvm::APFloat::IEEEhalf();
450  FloatFormat = &llvm::APFloat::IEEEsingle();
451  LongDoubleFormat = &llvm::APFloat::IEEEquad();
452 
453  // OpenCL C v3.0 s6.7.5 - The generic address space requires support for
454  // OpenCL C 2.0 or OpenCL C 3.0 with the __opencl_c_generic_address_space
455  // feature
456  // OpenCL C v3.0 s6.2.1 - OpenCL pipes require support of OpenCL C 2.0
457  // or later and __opencl_c_pipes feature
458  // FIXME: These language options are also defined in setLangDefaults()
459  // for OpenCL C 2.0 but with no access to target capabilities. Target
460  // should be immutable once created and thus these language options need
461  // to be defined only once.
462  if (Opts.getOpenCLCompatibleVersion() == 300) {
463  const auto &OpenCLFeaturesMap = getSupportedOpenCLOpts();
464  Opts.OpenCLGenericAddressSpace = hasFeatureEnabled(
465  OpenCLFeaturesMap, "__opencl_c_generic_address_space");
466  Opts.OpenCLPipes =
467  hasFeatureEnabled(OpenCLFeaturesMap, "__opencl_c_pipes");
468  Opts.Blocks =
469  hasFeatureEnabled(OpenCLFeaturesMap, "__opencl_c_device_enqueue");
470  }
471  }
472 
473  if (Opts.DoubleSize) {
474  if (Opts.DoubleSize == 32) {
475  DoubleWidth = 32;
476  LongDoubleWidth = 32;
477  DoubleFormat = &llvm::APFloat::IEEEsingle();
478  LongDoubleFormat = &llvm::APFloat::IEEEsingle();
479  } else if (Opts.DoubleSize == 64) {
480  DoubleWidth = 64;
481  LongDoubleWidth = 64;
482  DoubleFormat = &llvm::APFloat::IEEEdouble();
483  LongDoubleFormat = &llvm::APFloat::IEEEdouble();
484  }
485  }
486 
487  if (Opts.LongDoubleSize) {
488  if (Opts.LongDoubleSize == DoubleWidth) {
492  } else if (Opts.LongDoubleSize == 128) {
494  LongDoubleFormat = &llvm::APFloat::IEEEquad();
495  } else if (Opts.LongDoubleSize == 80) {
496  LongDoubleFormat = &llvm::APFloat::x87DoubleExtended();
497  if (getTriple().isWindowsMSVCEnvironment()) {
498  LongDoubleWidth = 128;
499  LongDoubleAlign = 128;
500  } else { // Linux
501  if (getTriple().getArch() == llvm::Triple::x86) {
502  LongDoubleWidth = 96;
503  LongDoubleAlign = 32;
504  } else {
505  LongDoubleWidth = 128;
506  LongDoubleAlign = 128;
507  }
508  }
509  }
510  }
511 
512  if (Opts.NewAlignOverride)
513  NewAlign = Opts.NewAlignOverride * getCharWidth();
514 
515  // Each unsigned fixed point type has the same number of fractional bits as
516  // its corresponding signed type.
517  PaddingOnUnsignedFixedPoint |= Opts.PaddingOnUnsignedFixedPoint;
518  CheckFixedPointBits();
519 
520  if (Opts.ProtectParens && !checkArithmeticFenceSupported()) {
521  Diags.Report(diag::err_opt_not_valid_on_target) << "-fprotect-parens";
522  Opts.ProtectParens = false;
523  }
524 
525  if (Opts.MaxBitIntWidth)
526  MaxBitIntWidth = static_cast<unsigned>(Opts.MaxBitIntWidth);
527 
528  if (Opts.FakeAddressSpaceMap)
530 
531  if ((Opts.SYCLIsDevice || Opts.OpenCL) && Opts.SYCLIsNativeCPU) {
532  // For SYCL Native CPU we use the NVPTXAddrSpaceMap because
533  // we need builtins to be mangled with AS information.
534  // This is also enabled in OpenCL mode so that mangling
535  // matches when building libclc.
536 
537  static const unsigned SYCLNativeCPUASMap[] = {
538  0, // Default
539  1, // opencl_global
540  3, // opencl_local
541  4, // opencl_constant
542  0, // opencl_private
543  0, // opencl_generic
544  1, // opencl_global_device
545  1, // opencl_global_host
546  1, // cuda_device
547  4, // cuda_constant
548  3, // cuda_shared
549  1, // sycl_global
550  1, // sycl_global_device
551  1, // sycl_global_host
552  3, // sycl_local
553  0, // sycl_private
554  0, // ptr32_sptr
555  0, // ptr32_uptr
556  0, // ptr64
557  0, // hlsl_groupshared
558  20, // wasm_funcref
559  };
560 
561  AddrSpaceMap = &SYCLNativeCPUASMap;
563  }
564 }
565 
567  llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU,
568  const std::vector<std::string> &FeatureVec) const {
569  for (const auto &F : FeatureVec) {
570  StringRef Name = F;
571  if (Name.empty())
572  continue;
573  // Apply the feature via the target.
574  if (Name[0] != '+' && Name[0] != '-')
575  Diags.Report(diag::warn_fe_backend_invalid_feature_flag) << Name;
576  else
577  setFeatureEnabled(Features, Name.substr(1), Name[0] == '+');
578  }
579  return true;
580 }
581 
584  if (Features == "default")
585  return Ret;
586  SmallVector<StringRef, 1> AttrFeatures;
587  Features.split(AttrFeatures, ",");
588 
589  // Grab the various features and prepend a "+" to turn on the feature to
590  // the backend and add them to our existing set of features.
591  for (auto &Feature : AttrFeatures) {
592  // Go ahead and trim whitespace rather than either erroring or
593  // accepting it weirdly.
594  Feature = Feature.trim();
595 
596  // TODO: Support the fpmath option. It will require checking
597  // overall feature validity for the function with the rest of the
598  // attributes on the function.
599  if (Feature.starts_with("fpmath="))
600  continue;
601 
602  if (Feature.starts_with("branch-protection=")) {
603  Ret.BranchProtection = Feature.split('=').second.trim();
604  continue;
605  }
606 
607  // While we're here iterating check for a different target cpu.
608  if (Feature.starts_with("arch=")) {
609  if (!Ret.CPU.empty())
610  Ret.Duplicate = "arch=";
611  else
612  Ret.CPU = Feature.split("=").second.trim();
613  } else if (Feature.starts_with("tune=")) {
614  if (!Ret.Tune.empty())
615  Ret.Duplicate = "tune=";
616  else
617  Ret.Tune = Feature.split("=").second.trim();
618  } else if (Feature.starts_with("no-"))
619  Ret.Features.push_back("-" + Feature.split("-").second.str());
620  else
621  Ret.Features.push_back("+" + Feature.str());
622  }
623  return Ret;
624 }
625 
627 TargetInfo::getCallingConvKind(bool ClangABICompat4) const {
628  if (getCXXABI() != TargetCXXABI::Microsoft &&
629  (ClangABICompat4 || getTriple().isPS4()))
630  return CCK_ClangABI4OrPS4;
631  return CCK_Default;
632 }
633 
635  return LangOpts.getClangABICompat() > LangOptions::ClangABI::Ver15;
636 }
637 
639  switch (TK) {
640  case OCLTK_Image:
641  case OCLTK_Pipe:
642  return LangAS::opencl_global;
643 
644  case OCLTK_Sampler:
646 
647  default:
648  return LangAS::Default;
649  }
650 }
651 
652 //===----------------------------------------------------------------------===//
653 
654 
655 static StringRef removeGCCRegisterPrefix(StringRef Name) {
656  if (Name[0] == '%' || Name[0] == '#')
657  Name = Name.substr(1);
658 
659  return Name;
660 }
661 
662 /// isValidClobber - Returns whether the passed in string is
663 /// a valid clobber in an inline asm statement. This is used by
664 /// Sema.
665 bool TargetInfo::isValidClobber(StringRef Name) const {
666  return (isValidGCCRegisterName(Name) || Name == "memory" || Name == "cc" ||
667  Name == "unwind");
668 }
669 
670 /// isValidGCCRegisterName - Returns whether the passed in string
671 /// is a valid register name according to GCC. This is used by Sema for
672 /// inline asm statements.
673 bool TargetInfo::isValidGCCRegisterName(StringRef Name) const {
674  if (Name.empty())
675  return false;
676 
677  // Get rid of any register prefix.
678  Name = removeGCCRegisterPrefix(Name);
679  if (Name.empty())
680  return false;
681 
683 
684  // If we have a number it maps to an entry in the register name array.
685  if (isDigit(Name[0])) {
686  unsigned n;
687  if (!Name.getAsInteger(0, n))
688  return n < Names.size();
689  }
690 
691  // Check register names.
692  if (llvm::is_contained(Names, Name))
693  return true;
694 
695  // Check any additional names that we have.
696  for (const AddlRegName &ARN : getGCCAddlRegNames())
697  for (const char *AN : ARN.Names) {
698  if (!AN)
699  break;
700  // Make sure the register that the additional name is for is within
701  // the bounds of the register names from above.
702  if (AN == Name && ARN.RegNum < Names.size())
703  return true;
704  }
705 
706  // Now check aliases.
707  for (const GCCRegAlias &GRA : getGCCRegAliases())
708  for (const char *A : GRA.Aliases) {
709  if (!A)
710  break;
711  if (A == Name)
712  return true;
713  }
714 
715  return false;
716 }
717 
719  bool ReturnCanonical) const {
720  assert(isValidGCCRegisterName(Name) && "Invalid register passed in");
721 
722  // Get rid of any register prefix.
723  Name = removeGCCRegisterPrefix(Name);
724 
726 
727  // First, check if we have a number.
728  if (isDigit(Name[0])) {
729  unsigned n;
730  if (!Name.getAsInteger(0, n)) {
731  assert(n < Names.size() && "Out of bounds register number!");
732  return Names[n];
733  }
734  }
735 
736  // Check any additional names that we have.
737  for (const AddlRegName &ARN : getGCCAddlRegNames())
738  for (const char *AN : ARN.Names) {
739  if (!AN)
740  break;
741  // Make sure the register that the additional name is for is within
742  // the bounds of the register names from above.
743  if (AN == Name && ARN.RegNum < Names.size())
744  return ReturnCanonical ? Names[ARN.RegNum] : Name;
745  }
746 
747  // Now check aliases.
748  for (const GCCRegAlias &RA : getGCCRegAliases())
749  for (const char *A : RA.Aliases) {
750  if (!A)
751  break;
752  if (A == Name)
753  return RA.Register;
754  }
755 
756  return Name;
757 }
758 
760  const char *Name = Info.getConstraintStr().c_str();
761  // An output constraint must start with '=' or '+'
762  if (*Name != '=' && *Name != '+')
763  return false;
764 
765  if (*Name == '+')
766  Info.setIsReadWrite();
767 
768  Name++;
769  while (*Name) {
770  switch (*Name) {
771  default:
772  if (!validateAsmConstraint(Name, Info)) {
773  // FIXME: We temporarily return false
774  // so we can add more constraints as we hit it.
775  // Eventually, an unknown constraint should just be treated as 'g'.
776  return false;
777  }
778  break;
779  case '&': // early clobber.
780  Info.setEarlyClobber();
781  break;
782  case '%': // commutative.
783  // FIXME: Check that there is a another register after this one.
784  break;
785  case 'r': // general register.
786  Info.setAllowsRegister();
787  break;
788  case 'm': // memory operand.
789  case 'o': // offsetable memory operand.
790  case 'V': // non-offsetable memory operand.
791  case '<': // autodecrement memory operand.
792  case '>': // autoincrement memory operand.
793  Info.setAllowsMemory();
794  break;
795  case 'g': // general register, memory operand or immediate integer.
796  case 'X': // any operand.
797  Info.setAllowsRegister();
798  Info.setAllowsMemory();
799  break;
800  case ',': // multiple alternative constraint. Pass it.
801  // Handle additional optional '=' or '+' modifiers.
802  if (Name[1] == '=' || Name[1] == '+')
803  Name++;
804  break;
805  case '#': // Ignore as constraint.
806  while (Name[1] && Name[1] != ',')
807  Name++;
808  break;
809  case '?': // Disparage slightly code.
810  case '!': // Disparage severely.
811  case '*': // Ignore for choosing register preferences.
812  case 'i': // Ignore i,n,E,F as output constraints (match from the other
813  // chars)
814  case 'n':
815  case 'E':
816  case 'F':
817  break; // Pass them.
818  }
819 
820  Name++;
821  }
822 
823  // Early clobber with a read-write constraint which doesn't permit registers
824  // is invalid.
825  if (Info.earlyClobber() && Info.isReadWrite() && !Info.allowsRegister())
826  return false;
827 
828  // If a constraint allows neither memory nor register operands it contains
829  // only modifiers. Reject it.
830  return Info.allowsMemory() || Info.allowsRegister();
831 }
832 
833 bool TargetInfo::resolveSymbolicName(const char *&Name,
834  ArrayRef<ConstraintInfo> OutputConstraints,
835  unsigned &Index) const {
836  assert(*Name == '[' && "Symbolic name did not start with '['");
837  Name++;
838  const char *Start = Name;
839  while (*Name && *Name != ']')
840  Name++;
841 
842  if (!*Name) {
843  // Missing ']'
844  return false;
845  }
846 
847  std::string SymbolicName(Start, Name - Start);
848 
849  for (Index = 0; Index != OutputConstraints.size(); ++Index)
850  if (SymbolicName == OutputConstraints[Index].getName())
851  return true;
852 
853  return false;
854 }
855 
857  MutableArrayRef<ConstraintInfo> OutputConstraints,
858  ConstraintInfo &Info) const {
859  const char *Name = Info.ConstraintStr.c_str();
860 
861  if (!*Name)
862  return false;
863 
864  while (*Name) {
865  switch (*Name) {
866  default:
867  // Check if we have a matching constraint
868  if (*Name >= '0' && *Name <= '9') {
869  const char *DigitStart = Name;
870  while (Name[1] >= '0' && Name[1] <= '9')
871  Name++;
872  const char *DigitEnd = Name;
873  unsigned i;
874  if (StringRef(DigitStart, DigitEnd - DigitStart + 1)
875  .getAsInteger(10, i))
876  return false;
877 
878  // Check if matching constraint is out of bounds.
879  if (i >= OutputConstraints.size()) return false;
880 
881  // A number must refer to an output only operand.
882  if (OutputConstraints[i].isReadWrite())
883  return false;
884 
885  // If the constraint is already tied, it must be tied to the
886  // same operand referenced to by the number.
887  if (Info.hasTiedOperand() && Info.getTiedOperand() != i)
888  return false;
889 
890  // The constraint should have the same info as the respective
891  // output constraint.
892  Info.setTiedOperand(i, OutputConstraints[i]);
893  } else if (!validateAsmConstraint(Name, Info)) {
894  // FIXME: This error return is in place temporarily so we can
895  // add more constraints as we hit it. Eventually, an unknown
896  // constraint should just be treated as 'g'.
897  return false;
898  }
899  break;
900  case '[': {
901  unsigned Index = 0;
902  if (!resolveSymbolicName(Name, OutputConstraints, Index))
903  return false;
904 
905  // If the constraint is already tied, it must be tied to the
906  // same operand referenced to by the number.
907  if (Info.hasTiedOperand() && Info.getTiedOperand() != Index)
908  return false;
909 
910  // A number must refer to an output only operand.
911  if (OutputConstraints[Index].isReadWrite())
912  return false;
913 
914  Info.setTiedOperand(Index, OutputConstraints[Index]);
915  break;
916  }
917  case '%': // commutative
918  // FIXME: Fail if % is used with the last operand.
919  break;
920  case 'i': // immediate integer.
921  break;
922  case 'n': // immediate integer with a known value.
923  Info.setRequiresImmediate();
924  break;
925  case 'I': // Various constant constraints with target-specific meanings.
926  case 'J':
927  case 'K':
928  case 'L':
929  case 'M':
930  case 'N':
931  case 'O':
932  case 'P':
933  if (!validateAsmConstraint(Name, Info))
934  return false;
935  break;
936  case 'r': // general register.
937  Info.setAllowsRegister();
938  break;
939  case 'm': // memory operand.
940  case 'o': // offsettable memory operand.
941  case 'V': // non-offsettable memory operand.
942  case '<': // autodecrement memory operand.
943  case '>': // autoincrement memory operand.
944  Info.setAllowsMemory();
945  break;
946  case 'g': // general register, memory operand or immediate integer.
947  case 'X': // any operand.
948  Info.setAllowsRegister();
949  Info.setAllowsMemory();
950  break;
951  case 'E': // immediate floating point.
952  case 'F': // immediate floating point.
953  case 'p': // address operand.
954  break;
955  case ',': // multiple alternative constraint. Ignore comma.
956  break;
957  case '#': // Ignore as constraint.
958  while (Name[1] && Name[1] != ',')
959  Name++;
960  break;
961  case '?': // Disparage slightly code.
962  case '!': // Disparage severely.
963  case '*': // Ignore for choosing register preferences.
964  break; // Pass them.
965  }
966 
967  Name++;
968  }
969 
970  return true;
971 }
972 
974  return false;
975 }
976 
977 void TargetInfo::CheckFixedPointBits() const {
978  // Check that the number of fractional and integral bits (and maybe sign) can
979  // fit into the bits given for a fixed point type.
981  assert(AccumScale + getAccumIBits() + 1 <= AccumWidth);
988 
989  assert(getShortFractScale() + 1 <= ShortFractWidth);
990  assert(getFractScale() + 1 <= FractWidth);
991  assert(getLongFractScale() + 1 <= LongFractWidth);
993  assert(getUnsignedFractScale() <= FractWidth);
995 
996  // Each unsigned fract type has either the same number of fractional bits
997  // as, or one more fractional bit than, its corresponding signed fract type.
1000  assert(getFractScale() == getUnsignedFractScale() ||
1004 
1005  // When arranged in order of increasing rank (see 6.3.1.3a), the number of
1006  // fractional bits is nondecreasing for each of the following sets of
1007  // fixed-point types:
1008  // - signed fract types
1009  // - unsigned fract types
1010  // - signed accum types
1011  // - unsigned accum types.
1012  assert(getLongFractScale() >= getFractScale() &&
1019 
1020  // When arranged in order of increasing rank (see 6.3.1.3a), the number of
1021  // integral bits is nondecreasing for each of the following sets of
1022  // fixed-point types:
1023  // - signed accum types
1024  // - unsigned accum types
1025  assert(getLongAccumIBits() >= getAccumIBits() &&
1029 
1030  // Each signed accum type has at least as many integral bits as its
1031  // corresponding unsigned accum type.
1033  assert(getAccumIBits() >= getUnsignedAccumIBits());
1035 }
1036 
1038  auto *Target = static_cast<TransferrableTargetInfo*>(this);
1039  auto *Src = static_cast<const TransferrableTargetInfo*>(Aux);
1040  *Target = *Src;
1041 }
Provides definitions for the various language-specific address spaces.
Defines the Diagnostic-related interfaces.
static const LangASMap DefaultAddrSpaceMap
Definition: TargetInfo.cpp:26
static StringRef removeGCCRegisterPrefix(StringRef Name)
Definition: TargetInfo.cpp:655
static const LangASMap FakeAddrSpaceMap
Definition: TargetInfo.cpp:29
llvm::APSInt APSInt
Defines the clang::LangOptions interface.
llvm::MachO::Target Target
Definition: MachO.h:50
static std::string getName(const CallEvent &Call)
Concrete class used by the front-end to report problems and issues.
Definition: Diagnostic.h:193
DiagnosticBuilder Report(SourceLocation Loc, unsigned DiagID)
Issue the message to the client.
Definition: Diagnostic.h:1553
@ Ver15
Attempt to be ABI-compatible with code generated by Clang 15.0.x.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:482
unsigned getOpenCLCompatibleVersion() const
Return the OpenCL version that kernel language is compatible with.
Definition: LangOptions.cpp:63
void set(Kind kind)
Definition: TargetCXXABI.h:76
Exposes information about the current target.
Definition: TargetInfo.h:218
virtual bool validatePointerAuthKey(const llvm::APSInt &value) const
Determine whether the given pointer-authentication key is valid.
Definition: TargetInfo.cpp:973
unsigned getUnsignedLongFractScale() const
getUnsignedLongFractScale - Return the number of fractional bits in a 'unsigned long _Fract' type.
Definition: TargetInfo.h:649
bool validateInputConstraint(MutableArrayRef< ConstraintInfo > OutputConstraints, ConstraintInfo &info) const
Definition: TargetInfo.cpp:856
virtual ~TargetInfo()
Definition: TargetInfo.cpp:188
bool resolveSymbolicName(const char *&Name, ArrayRef< ConstraintInfo > OutputConstraints, unsigned &Index) const
Definition: TargetInfo.cpp:833
void copyAuxTarget(const TargetInfo *Aux)
Copy type and layout related info.
TargetInfo(const llvm::Triple &T)
Definition: TargetInfo.cpp:54
virtual bool checkCFProtectionReturnSupported(DiagnosticsEngine &Diags) const
Check if the target supports CFProtection return.
Definition: TargetInfo.cpp:202
unsigned getShortWidth() const
Return the size of 'signed short' and 'unsigned short' for this target, in bits.
Definition: TargetInfo.h:501
unsigned getUnsignedAccumScale() const
getUnsignedAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned _Accum' ty...
Definition: TargetInfo.h:603
unsigned getIntAlign() const
Definition: TargetInfo.h:510
unsigned getUnsignedAccumIBits() const
Definition: TargetInfo.h:606
const LangASMap * AddrSpaceMap
Definition: TargetInfo.h:248
const char * UserLabelPrefix
Definition: TargetInfo.h:244
unsigned getUnsignedFractScale() const
getUnsignedFractScale - Return the number of fractional bits in a 'unsigned _Fract' type.
Definition: TargetInfo.h:643
llvm::StringMap< bool > & getSupportedOpenCLOpts()
Get supported OpenCL extensions and optional core features.
Definition: TargetInfo.h:1750
unsigned getLongAlign() const
Definition: TargetInfo.h:515
virtual IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const
Return the smallest integer type with at least the specified width.
Definition: TargetInfo.cpp:301
unsigned getLongLongAlign() const
Definition: TargetInfo.h:520
virtual bool hasFeatureEnabled(const llvm::StringMap< bool > &Features, StringRef Name) const
Check if target has a given feature enabled.
Definition: TargetInfo.h:1379
unsigned HasAArch64SVETypes
Definition: TargetInfo.h:267
void resetDataLayout(StringRef DL, const char *UserLabelPrefix="")
Definition: TargetInfo.cpp:190
unsigned char RegParmMax
Definition: TargetInfo.h:246
unsigned getTypeWidth(IntType T) const
Return the width (in bits) of the specified integer type enum.
Definition: TargetInfo.cpp:270
unsigned getLongFractScale() const
getLongFractScale - Return the number of fractional bits in a 'signed long _Fract' type.
Definition: TargetInfo.h:632
static bool isTypeSigned(IntType T)
Returns true if the type is signed; false otherwise.
Definition: TargetInfo.cpp:370
std::optional< unsigned > MaxBitIntWidth
Definition: TargetInfo.h:282
virtual void setFeatureEnabled(llvm::StringMap< bool > &Features, StringRef Name, bool Enabled) const
Enable or disable a specific target feature; the feature name must be valid.
Definition: TargetInfo.h:1386
virtual ArrayRef< AddlRegName > getGCCAddlRegNames() const
Definition: TargetInfo.h:1839
unsigned getAccumIBits() const
Definition: TargetInfo.h:581
virtual CallingConvKind getCallingConvKind(bool ClangABICompat4) const
Definition: TargetInfo.cpp:627
VersionTuple PlatformMinVersion
Definition: TargetInfo.h:251
unsigned getIntWidth() const
getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for this target,...
Definition: TargetInfo.h:509
const char * MCountName
Definition: TargetInfo.h:245
unsigned getShortAccumIBits() const
Definition: TargetInfo.h:574
unsigned getFloatWidth() const
getFloatWidth/Align/Format - Return the size/align/format of 'float'.
Definition: TargetInfo.h:767
unsigned IsRenderScriptTarget
Definition: TargetInfo.h:264
StringRef getNormalizedGCCRegisterName(StringRef Name, bool ReturnCanonical=false) const
Returns the "normalized" GCC register name.
Definition: TargetInfo.cpp:718
unsigned getLongAccumIBits() const
Definition: TargetInfo.h:586
FloatModeKind getRealTypeByWidth(unsigned BitWidth, FloatModeKind ExplicitType) const
Return floating point type with specified width.
Definition: TargetInfo.cpp:316
virtual IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const
Return integer type with specified width.
Definition: TargetInfo.cpp:286
unsigned getHalfWidth() const
getHalfWidth/Align/Format - Return the size/align/format of 'half'.
Definition: TargetInfo.h:762
const llvm::fltSemantics & getLongDoubleFormat() const
Definition: TargetInfo.h:785
unsigned char SSERegParmMax
Definition: TargetInfo.h:246
unsigned HasUnalignedAccess
Definition: TargetInfo.h:276
unsigned char MaxAtomicPromoteWidth
Definition: TargetInfo.h:242
virtual LangAS getOpenCLTypeAddrSpace(OpenCLTypeKind TK) const
Get address space for OpenCL type.
Definition: TargetInfo.cpp:638
static const char * getTypeName(IntType T)
Return the user string for the specified integer type enum.
Definition: TargetInfo.cpp:209
unsigned getCharAlign() const
Definition: TargetInfo.h:497
unsigned RealTypeUsesObjCFPRetMask
Definition: TargetInfo.h:256
unsigned MaxOpenCLWorkGroupSize
Definition: TargetInfo.h:280
unsigned getLongLongWidth() const
getLongLongWidth/Align - Return the size of 'signed long long' and 'unsigned long long' for this targ...
Definition: TargetInfo.h:519
virtual bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &info) const =0
StringRef PlatformName
Definition: TargetInfo.h:250
bool UseAddrSpaceMapMangling
Specify if mangling based on address space map should be used or not for language specific address sp...
Definition: TargetInfo.h:368
unsigned ComplexLongDoubleUsesFP2Ret
Definition: TargetInfo.h:258
virtual bool hasIbm128Type() const
Determine whether the __ibm128 type is supported on this target.
Definition: TargetInfo.h:708
virtual void adjust(DiagnosticsEngine &Diags, LangOptions &Opts)
Set forced language options.
Definition: TargetInfo.cpp:392
unsigned getUnsignedShortAccumIBits() const
Definition: TargetInfo.h:595
std::string DataLayoutString
Definition: TargetInfo.h:243
unsigned getUnsignedLongAccumScale() const
getUnsignedLongAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned long _...
Definition: TargetInfo.h:613
virtual bool hasFloat128Type() const
Determine whether the __float128 type is supported on this target.
Definition: TargetInfo.h:693
const llvm::Triple & getTriple() const
Returns the target triple of the primary target.
Definition: TargetInfo.h:1256
unsigned getUnsignedLongAccumIBits() const
Definition: TargetInfo.h:616
virtual ArrayRef< GCCRegAlias > getGCCRegAliases() const =0
unsigned getUnsignedShortFractScale() const
getUnsignedShortFractScale - Return the number of fractional bits in a 'unsigned short _Fract' type.
Definition: TargetInfo.h:636
unsigned HasAlignMac68kSupport
Definition: TargetInfo.h:254
bool validateOutputConstraint(ConstraintInfo &Info) const
Definition: TargetInfo.cpp:759
TargetCXXABI getCXXABI() const
Get the C++ ABI currently in use.
Definition: TargetInfo.h:1327
const char * getTypeConstantSuffix(IntType T) const
Return the constant suffix for the specified integer type enum.
Definition: TargetInfo.cpp:227
unsigned getDoubleWidth() const
getDoubleWidth/Align/Format - Return the size/align/format of 'double'.
Definition: TargetInfo.h:777
virtual bool checkArithmeticFenceSupported() const
Controls if __arithmetic_fence is supported in the targeted backend.
Definition: TargetInfo.h:1657
virtual ArrayRef< const char * > getGCCRegNames() const =0
bool isValidClobber(StringRef Name) const
Returns whether the passed in string is a valid clobber in an inline asm statement.
Definition: TargetInfo.cpp:665
virtual bool areDefaultedSMFStillPOD(const LangOptions &) const
Controls whether explicitly defaulted (= default) special member functions disqualify something from ...
Definition: TargetInfo.cpp:634
unsigned getCharWidth() const
Definition: TargetInfo.h:496
unsigned HasRISCVVTypes
Definition: TargetInfo.h:270
virtual ParsedTargetAttr parseTargetAttr(StringRef Str) const
Definition: TargetInfo.cpp:582
unsigned getLongWidth() const
getLongWidth/Align - Return the size of 'signed long' and 'unsigned long' for this target,...
Definition: TargetInfo.h:514
unsigned getFractScale() const
getFractScale - Return the number of fractional bits in a 'signed _Fract' type.
Definition: TargetInfo.h:628
virtual bool initFeatureMap(llvm::StringMap< bool > &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector< std::string > &FeatureVec) const
Initialize the map with the default set of target features for the CPU this should include all legal ...
Definition: TargetInfo.cpp:566
virtual bool checkCFProtectionBranchSupported(DiagnosticsEngine &Diags) const
Check if the target supports CFProtection branch.
Definition: TargetInfo.cpp:196
unsigned char MaxAtomicInlineWidth
Definition: TargetInfo.h:242
unsigned AllowAMDGPUUnsafeFPAtomics
Definition: TargetInfo.h:273
unsigned getShortFractScale() const
getShortFractScale - Return the number of fractional bits in a 'signed short _Fract' type.
Definition: TargetInfo.h:624
virtual uint64_t getMaxPointerWidth() const
Return the maximum width of pointers on this target.
Definition: TargetInfo.h:482
TargetCXXABI TheCXXABI
Definition: TargetInfo.h:247
unsigned ARMCDECoprocMask
Definition: TargetInfo.h:278
static const char * getTypeFormatModifier(IntType T)
Return the printf format modifier for the specified integer type enum.
Definition: TargetInfo.cpp:252
unsigned getUnsignedShortAccumScale() const
getUnsignedShortAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned short...
Definition: TargetInfo.h:592
unsigned HasBuiltinMSVaList
Definition: TargetInfo.h:261
unsigned getTypeAlign(IntType T) const
Return the alignment (in bits) of the specified integer type enum.
Definition: TargetInfo.cpp:352
unsigned getShortAlign() const
Return the alignment of 'signed short' and 'unsigned short' for this target.
Definition: TargetInfo.h:505
virtual bool isValidGCCRegisterName(StringRef Name) const
Returns whether the passed in string is a valid register name according to GCC.
Definition: TargetInfo.cpp:673
Defines the clang::TargetInfo interface.
bool Ret(InterpState &S, CodePtr &PC, APValue &Result)
Definition: Interp.h:218
The JSON file list parser is used to communicate input to InstallAPI.
unsigned[(unsigned) LangAS::FirstTargetAddressSpace] LangASMap
The type of a lookup table which maps from language-specific address spaces to target-specific ones.
Definition: AddressSpaces.h:73
OpenCLTypeKind
OpenCL type kinds.
Definition: TargetInfo.h:204
@ OCLTK_Image
Definition: TargetInfo.h:208
@ OCLTK_Sampler
Definition: TargetInfo.h:212
@ OCLTK_Pipe
Definition: TargetInfo.h:209
LLVM_READONLY bool isDigit(unsigned char c)
Return true if this character is an ASCII digit: [0-9].
Definition: CharInfo.h:114
LangAS
Defines the address space values used by the address space qualifier of QualType.
Definition: AddressSpaces.h:25
FloatModeKind
Definition: TargetInfo.h:72
const FunctionProtoType * T
Contains information gathered from parsing the contents of TargetAttr.
Definition: TargetInfo.h:57
const std::string & getConstraintStr() const
Definition: TargetInfo.h:1116
void setTiedOperand(unsigned N, ConstraintInfo &Output)
Indicate that this is an input operand that is tied to the specified output operand.
Definition: TargetInfo.h:1176
bool hasTiedOperand() const
Return true if this input operand is a matching constraint that ties it to an output operand.
Definition: TargetInfo.h:1132
void setRequiresImmediate(int Min, int Max)
Definition: TargetInfo.h:1153
Fields controlling how types are laid out in memory; these may need to be copied for targets like AMD...
Definition: TargetInfo.h:86
const llvm::fltSemantics * DoubleFormat
Definition: TargetInfo.h:139
unsigned UseZeroLengthBitfieldAlignment
Whether zero length bitfields (e.g., int : 0;) force alignment of the next bitfield.
Definition: TargetInfo.h:183
unsigned UseExplicitBitFieldAlignment
Whether explicit bit field alignment attributes are honored.
Definition: TargetInfo.h:192
IntType
===-— Target Data Type Query Methods ----------------------------—===//
Definition: TargetInfo.h:142
const llvm::fltSemantics * LongDoubleFormat
Definition: TargetInfo.h:139
unsigned ZeroLengthBitfieldBoundary
If non-zero, specifies a fixed alignment value for bitfields that follow zero length bitfield,...
Definition: TargetInfo.h:196
const llvm::fltSemantics * Float128Format
Definition: TargetInfo.h:139
unsigned UseLeadingZeroLengthBitfield
Whether zero length bitfield alignment is respected if they are the leading members.
Definition: TargetInfo.h:188
unsigned UseBitFieldTypeAlignment
Control whether the alignment of bit-field types is respected when laying out structures.
Definition: TargetInfo.h:174
unsigned char LargeArrayMinWidth
Definition: TargetInfo.h:95
unsigned MaxAlignedAttribute
If non-zero, specifies a maximum alignment to truncate alignment specified in the aligned attribute o...
Definition: TargetInfo.h:200
const llvm::fltSemantics * Ibm128Format
Definition: TargetInfo.h:139
const llvm::fltSemantics * FloatFormat
Definition: TargetInfo.h:138
const llvm::fltSemantics * HalfFormat
Definition: TargetInfo.h:138
unsigned UseSignedCharForObjCBool
Whether Objective-C's built-in boolean type should be signed char.
Definition: TargetInfo.h:166
unsigned char DefaultAlignForAttributeAligned
Definition: TargetInfo.h:130