15#include "mlir/IR/BuiltinAttributes.h"
16#include "mlir/IR/DialectImplementation.h"
17#include "mlir/IR/MLIRContext.h"
23#include "llvm/ADT/APInt.h"
24#include "llvm/ADT/APSInt.h"
25#include "llvm/ADT/TypeSwitch.h"
31 if (
auto sizedTy = mlir::dyn_cast<cir::SizedTypeInterface>(ty))
32 return sizedTy.isSized();
41static mlir::ParseResult
45 mlir::ArrayRef<mlir::Type> params,
51static mlir::ParseResult
56 mlir::ArrayRef<mlir::Type> params,
64 cir::TargetAddressSpaceAttr &attr);
67 cir::TargetAddressSpaceAttr attr);
75#include "clang/CIR/Dialect/IR/CIRTypeConstraints.cpp.inc"
79#define GET_TYPEDEF_CLASSES
80#include "clang/CIR/Dialect/IR/CIROpsTypes.cpp.inc"
89Type CIRDialect::parseType(DialectAsmParser &parser)
const {
90 llvm::SMLoc typeLoc = parser.getCurrentLocation();
91 llvm::StringRef mnemonic;
95 OptionalParseResult parseResult =
96 generatedTypeParser(parser, &mnemonic, genType);
97 if (parseResult.has_value())
101 return StringSwitch<function_ref<Type()>>(mnemonic)
102 .Case(
"record", [&] {
return RecordType::parse(parser); })
104 parser.emitError(typeLoc) <<
"unknown CIR type: " << mnemonic;
109void CIRDialect::printType(Type type, DialectAsmPrinter &os)
const {
111 if (generatedTypePrinter(type, os).succeeded())
115 llvm::report_fatal_error(
"printer is missing a handler for this type");
122Type RecordType::parse(mlir::AsmParser &parser) {
123 FailureOr<AsmParser::CyclicParseReset> cyclicParseGuard;
124 const llvm::SMLoc loc = parser.getCurrentLocation();
125 const mlir::Location eLoc = parser.getEncodedSourceLoc(loc);
129 mlir::MLIRContext *context = parser.getContext();
131 if (parser.parseLess())
136 if (parser.parseOptionalKeyword(
"struct").succeeded())
137 kind = RecordKind::Struct;
138 else if (parser.parseOptionalKeyword(
"union").succeeded())
139 kind = RecordKind::Union;
140 else if (parser.parseOptionalKeyword(
"class").succeeded())
141 kind = RecordKind::Class;
143 parser.emitError(loc,
"unknown record type");
147 mlir::StringAttr
name;
148 parser.parseOptionalAttribute(name);
151 if (name && parser.parseOptionalGreater().succeeded()) {
152 RecordType
type = getChecked(eLoc, context, name, kind);
153 if (succeeded(parser.tryStartCyclicParse(type))) {
154 parser.emitError(loc,
"invalid self-reference within record");
162 RecordType
type = getChecked(eLoc, context, name, kind);
163 cyclicParseGuard = parser.tryStartCyclicParse(type);
164 if (failed(cyclicParseGuard)) {
165 parser.emitError(loc,
"record already defined");
170 if (parser.parseOptionalKeyword(
"packed").succeeded())
173 if (parser.parseOptionalKeyword(
"padded").succeeded())
177 bool incomplete =
true;
178 llvm::SmallVector<mlir::Type> members;
179 if (parser.parseOptionalKeyword(
"incomplete").failed()) {
181 const auto delimiter = AsmParser::Delimiter::Braces;
182 const auto parseElementFn = [&parser, &members]() {
183 return parser.parseType(members.emplace_back());
185 if (parser.parseCommaSeparatedList(delimiter, parseElementFn).failed())
189 if (parser.parseGreater())
193 ArrayRef<mlir::Type> membersRef(members);
194 mlir::Type
type = {};
195 if (name && incomplete) {
196 type = getChecked(eLoc, context, name, kind);
197 }
else if (!name && !incomplete) {
198 type = getChecked(eLoc, context, membersRef, packed, padded, kind);
199 }
else if (!incomplete) {
200 type = getChecked(eLoc, context, membersRef, name, packed, padded, kind);
203 if (mlir::cast<RecordType>(type).isIncomplete())
204 mlir::cast<RecordType>(type).complete(membersRef, packed, padded);
207 parser.emitError(loc,
"anonymous records must be complete");
214void RecordType::print(mlir::AsmPrinter &printer)
const {
215 FailureOr<AsmPrinter::CyclicPrintReset> cyclicPrintGuard;
219 case RecordKind::Struct:
220 printer <<
"struct ";
222 case RecordKind::Union:
225 case RecordKind::Class:
234 cyclicPrintGuard = printer.tryStartCyclicPrint(*
this);
235 if (failed(cyclicPrintGuard)) {
244 printer <<
"packed ";
247 printer <<
"padded ";
249 if (isIncomplete()) {
250 printer <<
"incomplete";
253 llvm::interleaveComma(getMembers(), printer);
261RecordType::verify(function_ref<mlir::InFlightDiagnostic()> emitError,
262 llvm::ArrayRef<mlir::Type> members, mlir::StringAttr name,
263 bool incomplete,
bool packed,
bool padded,
264 RecordType::RecordKind kind) {
265 if (name &&
name.getValue().empty())
266 return emitError() <<
"identified records cannot have an empty name";
267 return mlir::success();
270::llvm::ArrayRef<mlir::Type> RecordType::getMembers()
const {
274bool RecordType::isIncomplete()
const {
return getImpl()->incomplete; }
276mlir::StringAttr RecordType::getName()
const {
return getImpl()->name; }
278bool RecordType::getIncomplete()
const {
return getImpl()->incomplete; }
280bool RecordType::getPacked()
const {
return getImpl()->packed; }
282bool RecordType::getPadded()
const {
return getImpl()->padded; }
284cir::RecordType::RecordKind RecordType::getKind()
const {
288void RecordType::complete(ArrayRef<Type> members,
bool packed,
bool padded) {
290 if (mutate(members, packed, padded).failed())
291 llvm_unreachable(
"failed to complete record");
297Type RecordType::getLargestMember(const ::mlir::DataLayout &dataLayout)
const {
298 assert(isUnion() &&
"Only call getLargestMember on unions");
299 llvm::ArrayRef<Type> members = getMembers();
305 auto endIt = getPadded() ? std::prev(members.end()) : members.end();
306 if (endIt == members.begin())
308 return *std::max_element(
309 members.begin(), endIt, [&](Type lhs, Type rhs) {
310 return dataLayout.getTypeABIAlignment(lhs) <
311 dataLayout.getTypeABIAlignment(rhs) ||
312 (dataLayout.getTypeABIAlignment(lhs) ==
313 dataLayout.getTypeABIAlignment(rhs) &&
314 dataLayout.getTypeSize(lhs) < dataLayout.getTypeSize(rhs));
318bool RecordType::isLayoutIdentical(
const RecordType &other) {
319 if (
getImpl() == other.getImpl())
322 if (getPacked() != other.getPacked())
325 return getMembers() == other.getMembers();
333PointerType::getTypeSizeInBits(const ::mlir::DataLayout &dataLayout,
334 ::mlir::DataLayoutEntryListRef params)
const {
337 return llvm::TypeSize::getFixed(64);
341PointerType::getABIAlignment(const ::mlir::DataLayout &dataLayout,
342 ::mlir::DataLayoutEntryListRef params)
const {
349RecordType::getTypeSizeInBits(
const mlir::DataLayout &dataLayout,
350 mlir::DataLayoutEntryListRef params)
const {
352 return dataLayout.getTypeSize(getLargestMember(dataLayout));
354 auto recordSize =
static_cast<uint64_t>(computeStructSize(dataLayout));
355 return llvm::TypeSize::getFixed(recordSize * 8);
359RecordType::getABIAlignment(const ::mlir::DataLayout &dataLayout,
360 ::mlir::DataLayoutEntryListRef params)
const {
362 return dataLayout.getTypeABIAlignment(getLargestMember(dataLayout));
367 return computeStructAlignment(dataLayout);
371RecordType::computeStructSize(
const mlir::DataLayout &dataLayout)
const {
372 assert(isComplete() &&
"Cannot get layout of incomplete records");
375 unsigned recordSize = 0;
378 for (mlir::Type ty : getMembers()) {
382 (getPacked() ? 1 : dataLayout.getTypeABIAlignment(ty));
386 recordSize = llvm::alignTo(recordSize, tyAlign);
387 recordSize += dataLayout.getTypeSize(ty);
391 recordAlignment = std::max(tyAlign, recordAlignment);
396 recordSize = llvm::alignTo(recordSize, recordAlignment);
405RecordType::computeStructAlignment(
const mlir::DataLayout &dataLayout)
const {
406 assert(isComplete() &&
"Cannot get layout of incomplete records");
410 for (mlir::Type ty : getMembers())
412 std::max(dataLayout.getTypeABIAlignment(ty), recordAlignment);
414 return recordAlignment;
417uint64_t RecordType::getElementOffset(const ::mlir::DataLayout &dataLayout,
418 unsigned idx)
const {
419 assert(idx < getMembers().size() &&
"access not valid");
422 if (isUnion() || idx == 0)
425 assert(isComplete() &&
"Cannot get layout of incomplete records");
426 assert(idx < getNumElements());
427 llvm::ArrayRef<mlir::Type> members = getMembers();
432 llvm::make_range(members.begin(), std::next(members.begin(), idx))) {
434 const llvm::Align tyAlign =
435 llvm::Align(getPacked() ? 1 : dataLayout.getTypeABIAlignment(ty));
438 offset = llvm::alignTo(offset, tyAlign);
441 offset += dataLayout.getTypeSize(ty);
446 const llvm::Align tyAlign = llvm::Align(
447 getPacked() ? 1 : dataLayout.getTypeABIAlignment(members[idx]));
448 offset = llvm::alignTo(offset, tyAlign);
457Type IntType::parse(mlir::AsmParser &parser) {
458 mlir::MLIRContext *context = parser.getBuilder().getContext();
459 llvm::SMLoc loc = parser.getCurrentLocation();
463 if (parser.parseLess())
467 llvm::StringRef
sign;
468 if (parser.parseKeyword(&
sign))
472 else if (
sign ==
"u")
475 parser.emitError(loc,
"expected 's' or 'u'");
479 if (parser.parseComma())
483 if (parser.parseInteger(width))
485 if (width < IntType::minBitwidth() || width > IntType::maxBitwidth()) {
486 parser.emitError(loc,
"expected integer width to be from ")
487 << IntType::minBitwidth() <<
" up to " << IntType::maxBitwidth();
491 if (parser.parseGreater())
494 return IntType::get(context, width, isSigned);
497void IntType::print(mlir::AsmPrinter &printer)
const {
498 char sign = isSigned() ?
's' :
'u';
499 printer <<
'<' <<
sign <<
", " << getWidth() <<
'>';
503IntType::getTypeSizeInBits(
const mlir::DataLayout &dataLayout,
504 mlir::DataLayoutEntryListRef params)
const {
505 return llvm::TypeSize::getFixed(getWidth());
508uint64_t IntType::getABIAlignment(
const mlir::DataLayout &dataLayout,
509 mlir::DataLayoutEntryListRef params)
const {
510 return (uint64_t)(getWidth() / 8);
514IntType::verify(llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
515 unsigned width,
bool isSigned) {
516 if (width < IntType::minBitwidth() || width > IntType::maxBitwidth())
517 return emitError() <<
"IntType only supports widths from "
518 << IntType::minBitwidth() <<
" up to "
519 << IntType::maxBitwidth();
520 return mlir::success();
524 return width == 8 || width == 16 || width == 32 || width == 64;
531const llvm::fltSemantics &SingleType::getFloatSemantics()
const {
532 return llvm::APFloat::IEEEsingle();
536SingleType::getTypeSizeInBits(
const mlir::DataLayout &dataLayout,
537 mlir::DataLayoutEntryListRef params)
const {
538 return llvm::TypeSize::getFixed(getWidth());
542SingleType::getABIAlignment(
const mlir::DataLayout &dataLayout,
543 mlir::DataLayoutEntryListRef params)
const {
544 return (uint64_t)(getWidth() / 8);
547const llvm::fltSemantics &DoubleType::getFloatSemantics()
const {
548 return llvm::APFloat::IEEEdouble();
552DoubleType::getTypeSizeInBits(
const mlir::DataLayout &dataLayout,
553 mlir::DataLayoutEntryListRef params)
const {
554 return llvm::TypeSize::getFixed(getWidth());
558DoubleType::getABIAlignment(
const mlir::DataLayout &dataLayout,
559 mlir::DataLayoutEntryListRef params)
const {
560 return (uint64_t)(getWidth() / 8);
563const llvm::fltSemantics &FP16Type::getFloatSemantics()
const {
564 return llvm::APFloat::IEEEhalf();
568FP16Type::getTypeSizeInBits(
const mlir::DataLayout &dataLayout,
569 mlir::DataLayoutEntryListRef params)
const {
570 return llvm::TypeSize::getFixed(getWidth());
573uint64_t FP16Type::getABIAlignment(
const mlir::DataLayout &dataLayout,
574 mlir::DataLayoutEntryListRef params)
const {
575 return (uint64_t)(getWidth() / 8);
578const llvm::fltSemantics &BF16Type::getFloatSemantics()
const {
579 return llvm::APFloat::BFloat();
583BF16Type::getTypeSizeInBits(
const mlir::DataLayout &dataLayout,
584 mlir::DataLayoutEntryListRef params)
const {
585 return llvm::TypeSize::getFixed(getWidth());
588uint64_t BF16Type::getABIAlignment(
const mlir::DataLayout &dataLayout,
589 mlir::DataLayoutEntryListRef params)
const {
590 return (uint64_t)(getWidth() / 8);
593const llvm::fltSemantics &FP80Type::getFloatSemantics()
const {
594 return llvm::APFloat::x87DoubleExtended();
598FP80Type::getTypeSizeInBits(
const mlir::DataLayout &dataLayout,
599 mlir::DataLayoutEntryListRef params)
const {
601 return llvm::TypeSize::getFixed(128);
604uint64_t FP80Type::getABIAlignment(
const mlir::DataLayout &dataLayout,
605 mlir::DataLayoutEntryListRef params)
const {
609const llvm::fltSemantics &FP128Type::getFloatSemantics()
const {
610 return llvm::APFloat::IEEEquad();
614FP128Type::getTypeSizeInBits(
const mlir::DataLayout &dataLayout,
615 mlir::DataLayoutEntryListRef params)
const {
616 return llvm::TypeSize::getFixed(getWidth());
619uint64_t FP128Type::getABIAlignment(
const mlir::DataLayout &dataLayout,
620 mlir::DataLayoutEntryListRef params)
const {
624const llvm::fltSemantics &LongDoubleType::getFloatSemantics()
const {
625 return mlir::cast<cir::FPTypeInterface>(getUnderlying()).getFloatSemantics();
629LongDoubleType::getTypeSizeInBits(
const mlir::DataLayout &dataLayout,
630 mlir::DataLayoutEntryListRef params)
const {
631 return mlir::cast<mlir::DataLayoutTypeInterface>(getUnderlying())
632 .getTypeSizeInBits(dataLayout, params);
636LongDoubleType::getABIAlignment(
const mlir::DataLayout &dataLayout,
637 mlir::DataLayoutEntryListRef params)
const {
638 return mlir::cast<mlir::DataLayoutTypeInterface>(getUnderlying())
639 .getABIAlignment(dataLayout, params);
647cir::ComplexType::getTypeSizeInBits(
const mlir::DataLayout &dataLayout,
648 mlir::DataLayoutEntryListRef params)
const {
654 return dataLayout.getTypeSizeInBits(getElementType()) * 2;
658cir::ComplexType::getABIAlignment(
const mlir::DataLayout &dataLayout,
659 mlir::DataLayoutEntryListRef params)
const {
665 return dataLayout.getTypeABIAlignment(getElementType());
668FuncType FuncType::clone(TypeRange inputs, TypeRange results)
const {
669 assert(results.size() == 1 &&
"expected exactly one result type");
670 return get(llvm::to_vector(inputs), results[0], isVarArg());
674static mlir::ParseResult
678 return p.parseCommaSeparatedList(
679 AsmParser::Delimiter::Paren, [&]() -> mlir::ParseResult {
681 return p.emitError(p.getCurrentLocation(),
682 "variadic `...` must be the last parameter");
683 if (succeeded(p.parseOptionalEllipsis())) {
688 if (failed(p.parseType(type)))
690 params.push_back(type);
696 mlir::ArrayRef<mlir::Type> params,
699 llvm::interleaveComma(params, p,
700 [&p](mlir::Type type) { p.printType(type); });
711mlir::Type FuncType::getReturnType()
const {
713 return cir::VoidType::get(getContext());
714 return getOptionalReturnType();
720llvm::ArrayRef<mlir::Type> FuncType::getReturnTypes()
const {
726 return getImpl()->optionalReturnType;
730bool FuncType::hasVoidReturn()
const {
return !getOptionalReturnType(); }
733FuncType::verify(llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
734 llvm::ArrayRef<mlir::Type> argTypes, mlir::Type returnType,
736 if (mlir::isa_and_nonnull<cir::VoidType>(returnType))
738 <<
"!cir.func cannot have an explicit 'void' return type";
739 return mlir::success();
751 auto voidPtrTy = cir::PointerType::get(cir::VoidType::get(ctx));
752 mlir::Type fields[2]{voidPtrTy, voidPtrTy};
753 return cir::RecordType::get(ctx, fields,
false,
754 false, cir::RecordType::Struct);
758MethodType::getTypeSizeInBits(
const mlir::DataLayout &dataLayout,
759 mlir::DataLayoutEntryListRef params)
const {
764MethodType::getABIAlignment(
const mlir::DataLayout &dataLayout,
765 mlir::DataLayoutEntryListRef params)
const {
774BoolType::getTypeSizeInBits(const ::mlir::DataLayout &dataLayout,
775 ::mlir::DataLayoutEntryListRef params)
const {
776 return llvm::TypeSize::getFixed(8);
780BoolType::getABIAlignment(const ::mlir::DataLayout &dataLayout,
781 ::mlir::DataLayoutEntryListRef params)
const {
790DataMemberType::getTypeSizeInBits(const ::mlir::DataLayout &dataLayout,
791 ::mlir::DataLayoutEntryListRef params)
const {
794 return llvm::TypeSize::getFixed(64);
798DataMemberType::getABIAlignment(const ::mlir::DataLayout &dataLayout,
799 ::mlir::DataLayoutEntryListRef params)
const {
810VPtrType::getTypeSizeInBits(
const mlir::DataLayout &dataLayout,
811 mlir::DataLayoutEntryListRef params)
const {
813 return llvm::TypeSize::getFixed(64);
816uint64_t VPtrType::getABIAlignment(
const mlir::DataLayout &dataLayout,
817 mlir::DataLayoutEntryListRef params)
const {
827ArrayType::getTypeSizeInBits(const ::mlir::DataLayout &dataLayout,
828 ::mlir::DataLayoutEntryListRef params)
const {
829 return getSize() * dataLayout.getTypeSizeInBits(getElementType());
833ArrayType::getABIAlignment(const ::mlir::DataLayout &dataLayout,
834 ::mlir::DataLayoutEntryListRef params)
const {
835 return dataLayout.getTypeABIAlignment(getElementType());
842llvm::TypeSize cir::VectorType::getTypeSizeInBits(
843 const ::mlir::DataLayout &dataLayout,
844 ::mlir::DataLayoutEntryListRef params)
const {
845 return llvm::TypeSize::getFixed(
846 getSize() * dataLayout.getTypeSizeInBits(getElementType()));
850cir::VectorType::getABIAlignment(const ::mlir::DataLayout &dataLayout,
851 ::mlir::DataLayoutEntryListRef params)
const {
852 return llvm::NextPowerOf2(dataLayout.getTypeSizeInBits(*
this));
855mlir::LogicalResult cir::VectorType::verify(
856 llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
857 mlir::Type elementType, uint64_t size,
bool scalable) {
859 return emitError() <<
"the number of vector elements must be non-zero";
863mlir::Type cir::VectorType::parse(::mlir::AsmParser &odsParser) {
865 llvm::SMLoc odsLoc = odsParser.getCurrentLocation();
866 mlir::Builder odsBuilder(odsParser.getContext());
867 mlir::FailureOr<::mlir::Type> elementType;
868 mlir::FailureOr<uint64_t> size;
869 bool isScalabe =
false;
872 if (odsParser.parseLess())
876 if (odsParser.parseOptionalLSquare().succeeded())
880 size = mlir::FieldParser<uint64_t>::parse(odsParser);
881 if (mlir::failed(size)) {
882 odsParser.emitError(odsParser.getCurrentLocation(),
883 "failed to parse CIR_VectorType parameter 'size' which "
884 "is to be a `uint64_t`");
890 if (isScalabe && odsParser.parseRSquare().failed()) {
891 odsParser.emitError(odsParser.getCurrentLocation(),
892 "missing closing `]` for scalable dim size");
897 if (odsParser.parseKeyword(
"x"))
901 elementType = mlir::FieldParser<::mlir::Type>::parse(odsParser);
902 if (mlir::failed(elementType)) {
903 odsParser.emitError(odsParser.getCurrentLocation(),
904 "failed to parse CIR_VectorType parameter "
905 "'elementType' which is to be a `mlir::Type`");
910 if (odsParser.parseGreater())
912 return odsParser.getChecked<VectorType>(odsLoc, odsParser.getContext(),
913 mlir::Type((*elementType)),
917void cir::VectorType::print(mlir::AsmPrinter &odsPrinter)
const {
918 mlir::Builder odsBuilder(getContext());
920 if (this->getIsScalable())
923 odsPrinter.printStrippedAttrOrType(getSize());
924 if (this->getIsScalable())
926 odsPrinter <<
' ' <<
"x";
928 odsPrinter.printStrippedAttrOrType(getElementType());
936cir::TargetAddressSpaceAttr
938 return cir::TargetAddressSpaceAttr::get(
940 IntegerAttr::get(&context,
951 if (!isTargetAddressSpace(as))
954 return cirAS.getValue().getUInt() == toTargetAddressSpace(as);
958 cir::TargetAddressSpaceAttr &attr) {
959 if (failed(p.parseKeyword(
"target_address_space")))
960 return mlir::failure();
962 if (failed(p.parseLParen()))
963 return mlir::failure();
966 if (failed(p.parseInteger(targetValue)))
967 return p.emitError(p.getCurrentLocation(),
968 "expected integer address space value");
970 if (failed(p.parseRParen()))
971 return p.emitError(p.getCurrentLocation(),
972 "expected ')' after address space value");
974 mlir::MLIRContext *context = p.getBuilder().getContext();
975 attr = cir::TargetAddressSpaceAttr::get(
976 context, p.getBuilder().getUI32IntegerAttr(targetValue));
977 return mlir::success();
983 cir::TargetAddressSpaceAttr attr) {
984 p <<
"target_address_space(" << attr.getValue().getUInt() <<
")";
991void CIRDialect::registerTypes() {
994#define GET_TYPEDEF_LIST
995#include "clang/CIR/Dialect/IR/CIROpsTypes.cpp.inc"
Provides definitions for the various language-specific address spaces.
mlir::ParseResult parseTargetAddressSpace(mlir::AsmParser &p, cir::TargetAddressSpaceAttr &attr)
void printTargetAddressSpace(mlir::AsmPrinter &p, cir::TargetAddressSpaceAttr attr)
mlir::ParseResult parseTargetAddressSpace(mlir::AsmParser &p, cir::TargetAddressSpaceAttr &attr)
static mlir::ParseResult parseFuncTypeParams(mlir::AsmParser &p, llvm::SmallVector< mlir::Type > ¶ms, bool &isVarArg)
static mlir::Type getMethodLayoutType(mlir::MLIRContext *ctx)
static void printFuncTypeParams(mlir::AsmPrinter &p, mlir::ArrayRef< mlir::Type > params, bool isVarArg)
void printTargetAddressSpace(mlir::AsmPrinter &p, cir::TargetAddressSpaceAttr attr)
static Decl::Kind getKind(const Decl *D)
static LiveVariablesImpl & getImpl(void *x)
bool isValidFundamentalIntWidth(unsigned width)
bool isSized(mlir::Type ty)
Returns true if the type is a CIR sized type.
bool isMatchingAddressSpace(cir::TargetAddressSpaceAttr cirAS, clang::LangAS as)
cir::TargetAddressSpaceAttr toCIRTargetAddressSpace(mlir::MLIRContext &context, clang::LangAS langAS)
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
unsigned kind
All of the diagnostics that can be emitted by the frontend.
StringRef getName(const HeaderType T)
unsigned toTargetAddressSpace(LangAS AS)
LangAS
Defines the address space values used by the address space qualifier of QualType.
float __ovld __cnfn sign(float)
Returns 1.0 if x > 0, -0.0 if x = -0.0, +0.0 if x = +0.0, or -1.0 if x < 0.
static bool unsizedTypes()
static bool dataLayoutPtrHandlingBasedOnLangAS()
static bool astRecordDeclAttr()