#include "TestTypes.h"
#include "TestDialect.h"
#include "mlir/Dialect/LLVMIR/LLVMTypes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/DialectImplementation.h"
#include "mlir/IR/ExtensibleDialect.h"
#include "mlir/IR/Types.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/TypeSize.h"
#include <optional>
usingnamespacemlir;
usingnamespacetest;
static ParseResult
parseSignedness(AsmParser &parser,
TestIntegerType::SignednessSemantics &result) { … }
static void printSignedness(AsmPrinter &printer,
const TestIntegerType::SignednessSemantics &ss) { … }
namespace test {
static bool operator==(const FieldInfo &a, const FieldInfo &b);
static llvm::hash_code hash_value(const FieldInfo &fi);
}
static bool test::operator==(const FieldInfo &a, const FieldInfo &b) { … }
static llvm::hash_code test::hash_value(const FieldInfo &fi) { … }
static LogicalResult parseCustomTypeA(AsmParser &parser, int &aResult) { … }
static void printCustomTypeA(AsmPrinter &printer, int a) { … }
static LogicalResult parseCustomTypeB(AsmParser &parser, int a,
std::optional<int> &bResult) { … }
static void printCustomTypeB(AsmPrinter &printer, int a, std::optional<int> b) { … }
static LogicalResult parseFooString(AsmParser &parser, std::string &foo) { … }
static void printFooString(AsmPrinter &printer, StringRef foo) { … }
static LogicalResult parseBarString(AsmParser &parser, StringRef foo) { … }
static void printBarString(AsmPrinter &printer, StringRef foo) { … }
#include "TestTypeInterfaces.cpp.inc"
#define GET_TYPEDEF_CLASSES
#include "TestTypeDefs.cpp.inc"
Type CompoundAType::parse(AsmParser &parser) { … }
void CompoundAType::print(AsmPrinter &printer) const { … }
LogicalResult
TestIntegerType::verify(function_ref<InFlightDiagnostic()> emitError,
unsigned width,
TestIntegerType::SignednessSemantics ss) { … }
Type TestIntegerType::parse(AsmParser &parser) { … }
void TestIntegerType::print(AsmPrinter &p) const { … }
Type StructType::parse(AsmParser &p) { … }
void StructType::print(AsmPrinter &p) const { … }
void TestType::printTypeC(Location loc) const { … }
Type TestTypeWithLayoutType::parse(AsmParser &parser) { … }
void TestTypeWithLayoutType::print(AsmPrinter &printer) const { … }
llvm::TypeSize
TestTypeWithLayoutType::getTypeSizeInBits(const DataLayout &dataLayout,
DataLayoutEntryListRef params) const { … }
uint64_t
TestTypeWithLayoutType::getABIAlignment(const DataLayout &dataLayout,
DataLayoutEntryListRef params) const { … }
uint64_t TestTypeWithLayoutType::getPreferredAlignment(
const DataLayout &dataLayout, DataLayoutEntryListRef params) const { … }
std::optional<uint64_t>
TestTypeWithLayoutType::getIndexBitwidth(const DataLayout &dataLayout,
DataLayoutEntryListRef params) const { … }
bool TestTypeWithLayoutType::areCompatible(
DataLayoutEntryListRef oldLayout, DataLayoutEntryListRef newLayout) const { … }
LogicalResult
TestTypeWithLayoutType::verifyEntries(DataLayoutEntryListRef params,
Location loc) const { … }
uint64_t TestTypeWithLayoutType::extractKind(DataLayoutEntryListRef params,
StringRef expectedKind) const { … }
static std::unique_ptr<DynamicTypeDefinition>
getSingletonDynamicType(TestDialect *testDialect) { … }
static std::unique_ptr<DynamicTypeDefinition>
getPairDynamicType(TestDialect *testDialect) { … }
static std::unique_ptr<DynamicTypeDefinition>
getCustomAssemblyFormatDynamicType(TestDialect *testDialect) { … }
namespace {
struct PtrElementModel
: public LLVM::PointerElementTypeInterface::ExternalModel<PtrElementModel,
SimpleAType> { … };
}
void TestDialect::registerTypes() { … }
Type TestDialect::parseType(DialectAsmParser &parser) const { … }
void TestDialect::printType(Type type, DialectAsmPrinter &printer) const { … }
Type TestRecursiveAliasType::getBody() const { … }
void TestRecursiveAliasType::setBody(Type type) { … }
StringRef TestRecursiveAliasType::getName() const { … }
Type TestRecursiveAliasType::parse(AsmParser &parser) { … }
void TestRecursiveAliasType::print(AsmPrinter &printer) const { … }