MLIR 23.0.0git
DialectLLVM.cpp
Go to the documentation of this file.
1//===- DialectLLVM.cpp - Pybind module for LLVM dialect API support -------===//
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#include <string>
10#include <vector>
11
12#include "mlir-c/Dialect/LLVM.h"
13#include "mlir-c/IR.h"
14#include "mlir-c/Support.h"
20
21namespace nb = nanobind;
22
23using namespace nanobind::literals;
24using namespace mlir;
26
27namespace mlir {
28namespace python {
30namespace llvm {
31//===--------------------------------------------------------------------===//
32// StructType
33//===--------------------------------------------------------------------===//
34
35struct StructType : PyConcreteType<StructType> {
39 static constexpr const char *pyClassName = "StructType";
41 using Base::Base;
42
43 static void bindDerived(ClassTy &c) {
44 c.def_static(
45 "get_literal",
46 [](const std::vector<PyType> &elements, bool packed,
50 std::vector<MlirType> elements_(elements.size());
51 std::copy(elements.begin(), elements.end(), elements_.begin());
52
54 loc, elements.size(), elements_.data(), packed);
55 if (mlirTypeIsNull(type)) {
56 throw nb::value_error(scope.takeMessage().c_str());
57 }
58 return StructType(context->getRef(), type);
59 },
60 "elements"_a, nb::kw_only(), "packed"_a = false, "loc"_a = nb::none(),
61 "context"_a = nb::none());
62
63 c.def_static(
64 "get_literal_unchecked",
65 [](const std::vector<PyType> &elements, bool packed,
67 python::CollectDiagnosticsToStringScope scope(context.get()->get());
68
69 std::vector<MlirType> elements_(elements.size());
70 std::copy(elements.begin(), elements.end(), elements_.begin());
71
72 MlirType type = mlirLLVMStructTypeLiteralGet(
73 context.get()->get(), elements.size(), elements_.data(), packed);
74 if (mlirTypeIsNull(type)) {
75 throw nb::value_error(scope.takeMessage().c_str());
76 }
77 return StructType(context->getRef(), type);
78 },
79 "elements"_a, nb::kw_only(), "packed"_a = false,
80 "context"_a = nb::none());
81
82 c.def_static(
83 "get_identified",
84 [](const std::string &name, DefaultingPyMlirContext context) {
85 return StructType(context->getRef(),
87 context.get()->get(),
88 mlirStringRefCreate(name.data(), name.size())));
89 },
90 "name"_a, nb::kw_only(), "context"_a = nb::none());
91
92 c.def_static(
93 "get_opaque",
94 [](const std::string &name, DefaultingPyMlirContext context) {
95 return StructType(context->getRef(),
97 context.get()->get(),
98 mlirStringRefCreate(name.data(), name.size())));
99 },
100 "name"_a, "context"_a = nb::none());
101
102 c.def(
103 "set_body",
104 [](const StructType &self, const std::vector<PyType> &elements,
105 bool packed) {
106 std::vector<MlirType> elements_(elements.size());
107 std::copy(elements.begin(), elements.end(), elements_.begin());
109 self, elements.size(), elements_.data(), packed);
111 throw nb::value_error(
112 "Struct body already set to different content.");
113 }
114 },
115 "elements"_a, nb::kw_only(), "packed"_a = false);
116
117 c.def_static(
118 "new_identified",
119 [](const std::string &name, const std::vector<PyType> &elements,
120 bool packed, DefaultingPyMlirContext context) {
121 std::vector<MlirType> elements_(elements.size());
122 std::copy(elements.begin(), elements.end(), elements_.begin());
123 return StructType(context->getRef(),
125 context.get()->get(),
126 mlirStringRefCreate(name.data(), name.length()),
127 elements.size(), elements_.data(), packed));
128 },
129 "name"_a, "elements"_a, nb::kw_only(), "packed"_a = false,
130 "context"_a = nb::none());
131
132 c.def_prop_ro("name",
133 [](const StructType &type) -> std::optional<MlirStringRef> {
135 return std::nullopt;
136
138 });
139
140 c.def_prop_ro("body", [](const StructType &type) -> nb::object {
141 // Don't crash in absence of a body.
143 return nb::none();
144
145 nb::list body;
147 i < e; ++i) {
148 body.append(mlirLLVMStructTypeGetElementType(type, i));
149 }
150 return body;
151 });
152
153 c.def_prop_ro("packed", [](const StructType &type) {
154 return mlirLLVMStructTypeIsPacked(type);
155 });
156
157 c.def_prop_ro("opaque", [](const StructType &type) {
158 return mlirLLVMStructTypeIsOpaque(type);
159 });
160 }
161};
162
163//===--------------------------------------------------------------------===//
164// ArrayType
165//===--------------------------------------------------------------------===//
166
167struct ArrayType : PyConcreteType<ArrayType> {
171 static constexpr const char *pyClassName = "ArrayType";
173 using Base::Base;
174
175 static void bindDerived(ClassTy &c) {
176 c.def_static(
177 "get",
178 [](PyType &elementType, unsigned numElements) {
179 return ArrayType(elementType.getContext(),
180 mlirLLVMArrayTypeGet(elementType, numElements));
181 },
182 "element_type"_a, "num_elements"_a);
183 c.def_prop_ro("element_type", [](const ArrayType &type) {
185 });
186 c.def_prop_ro("num_elements", [](const ArrayType &type) {
188 });
189 }
190};
191
192//===--------------------------------------------------------------------===//
193// PointerType
194//===--------------------------------------------------------------------===//
195
196struct PointerType : PyConcreteType<PointerType> {
200 static constexpr const char *pyClassName = "PointerType";
202 using Base::Base;
203
204 static void bindDerived(ClassTy &c) {
205 c.def_static(
206 "get",
207 [](std::optional<unsigned> addressSpace,
208 DefaultingPyMlirContext context) {
209 python::CollectDiagnosticsToStringScope scope(context.get()->get());
210 MlirType type = mlirLLVMPointerTypeGet(
211 context.get()->get(),
212 addressSpace.has_value() ? *addressSpace : 0);
213 if (mlirTypeIsNull(type)) {
214 throw nb::value_error(scope.takeMessage().c_str());
215 }
216 return PointerType(context->getRef(), type);
217 },
218 "address_space"_a = nb::none(), nb::kw_only(),
219 "context"_a = nb::none());
220 c.def_prop_ro("address_space", [](const PointerType &type) {
222 });
223 }
224};
225
226//===--------------------------------------------------------------------===//
227// FunctionType
228//===--------------------------------------------------------------------===//
229
230struct FunctionType : PyConcreteType<FunctionType> {
234 static constexpr const char *pyClassName = "FunctionType";
236 using Base::Base;
237
238 static void bindDerived(ClassTy &c) {
239 c.def_static(
240 "get",
241 [](PyType &resultType, const std::vector<PyType> &argumentTypes,
242 bool isVarArg) {
243 std::vector<MlirType> argTypes(argumentTypes.size());
244 std::copy(argumentTypes.begin(), argumentTypes.end(),
245 argTypes.begin());
246 return FunctionType(
247 resultType.getContext(),
248 mlirLLVMFunctionTypeGet(resultType, argTypes.size(),
249 argTypes.data(), isVarArg));
250 },
251 "result_type"_a, "argument_types"_a, nb::kw_only(),
252 "is_var_arg"_a = false);
253 c.def_prop_ro("return_type", [](const FunctionType &type) {
255 });
256 c.def_prop_ro("num_inputs", [](const FunctionType &type) {
258 });
259 c.def_prop_ro("inputs", [](const FunctionType &type) {
260 nb::list inputs;
261 for (intptr_t i = 0, e = mlirLLVMFunctionTypeGetNumInputs(type); i < e;
262 ++i) {
263 inputs.append(mlirLLVMFunctionTypeGetInput(type, i));
264 }
265 return inputs;
266 });
267 c.def_prop_ro("is_var_arg", [](const FunctionType &type) {
268 return mlirLLVMFunctionTypeIsVarArg(type);
269 });
270 }
271};
272
273//===--------------------------------------------------------------------===//
274// Metadata Attributes
275//===--------------------------------------------------------------------===//
276
277struct MDStringAttr : PyConcreteAttribute<MDStringAttr> {
281 static constexpr const char *pyClassName = "MDStringAttr";
282 using Base::Base;
283
284 static void bindDerived(ClassTy &c) {
285 c.def_static(
286 "get",
287 [](const std::string &value, DefaultingPyMlirContext context) {
288 return MDStringAttr(
289 context->getRef(),
291 context.get()->get(),
292 mlirStringRefCreate(value.data(), value.size())));
293 },
294 "value"_a, nb::kw_only(), "context"_a = nb::none());
295 c.def_prop_ro("value", [](const MDStringAttr &self) {
297 return nb::str(ref.data, ref.length);
298 });
299 }
300};
301
302struct MDConstantAttr : PyConcreteAttribute<MDConstantAttr> {
306 static constexpr const char *pyClassName = "MDConstantAttr";
307 using Base::Base;
308
309 static void bindDerived(ClassTy &c) {
310 c.def_static(
311 "get",
312 [](PyAttribute &valueAttr, DefaultingPyMlirContext context) {
313 return MDConstantAttr(
314 context->getRef(),
315 mlirLLVMMDConstantAttrGet(context.get()->get(), valueAttr));
316 },
317 "value"_a, nb::kw_only(), "context"_a = nb::none());
318 c.def_prop_ro("value", [](const MDConstantAttr &self) {
320 });
321 }
322};
323
324struct MDFuncAttr : PyConcreteAttribute<MDFuncAttr> {
328 static constexpr const char *pyClassName = "MDFuncAttr";
329 using Base::Base;
330
331 static void bindDerived(ClassTy &c) {
332 c.def_static(
333 "get",
334 [](const std::string &name, DefaultingPyMlirContext context) {
335 MlirAttribute symRef = mlirFlatSymbolRefAttrGet(
336 context.get()->get(),
337 mlirStringRefCreate(name.data(), name.size()));
338 return MDFuncAttr(
339 context->getRef(),
340 mlirLLVMMDFuncAttrGet(context.get()->get(), symRef));
341 },
342 "name"_a, nb::kw_only(), "context"_a = nb::none());
343 c.def_prop_ro("name", [](const MDFuncAttr &self) {
344 MlirAttribute symRef = mlirLLVMMDFuncAttrGetName(self);
346 return nb::str(ref.data, ref.length);
347 });
348 }
349};
350
351struct MDNodeAttr : PyConcreteAttribute<MDNodeAttr> {
355 static constexpr const char *pyClassName = "MDNodeAttr";
356 using Base::Base;
357
358 static void bindDerived(ClassTy &c) {
359 c.def_static(
360 "get",
361 [](const std::vector<PyAttribute> &operands,
362 DefaultingPyMlirContext context) {
363 std::vector<MlirAttribute> operands_(operands.size());
364 std::copy(operands.begin(), operands.end(), operands_.begin());
365 return MDNodeAttr(context->getRef(),
366 mlirLLVMMDNodeAttrGet(context.get()->get(),
367 operands_.size(),
368 operands_.data()));
369 },
370 "operands"_a, nb::kw_only(), "context"_a = nb::none());
371 c.def_prop_ro("num_operands", [](const MDNodeAttr &self) {
373 });
374 c.def("__getitem__", [](const MDNodeAttr &self, intptr_t index) {
376 if (index < 0 || index >= n)
377 throw nb::index_error("MDNodeAttr operand index out of range");
379 });
380 c.def("__len__", [](const MDNodeAttr &self) {
382 });
383 }
384};
385
386static void populateDialectLLVMSubmodule(nanobind::module_ &m) {
395
396 m.def(
397 "translate_module_to_llvmir",
398 [](const PyOperation &module) {
400 },
401 "module"_a, nb::rv_policy::take_ownership);
402}
403} // namespace llvm
404} // namespace MLIR_BINDINGS_PYTHON_DOMAIN
405} // namespace python
406} // namespace mlir
407
408NB_MODULE(_mlirDialectsLLVM, m) {
409 m.doc() = "MLIR LLVM Dialect";
410
412 m);
413}
NB_MODULE(_mlirDialectsLLVM, m)
MLIR_CAPI_EXPORTED char * mlirTranslateModuleToLLVMIRToString(MlirOperation module)
Definition LLVMIR.cpp:37
RAII scope intercepting all diagnostics into a string.
Definition Diagnostics.h:25
ReferrentTy * get() const
PyMlirContextRef & getContext()
Accesses the context reference.
Definition IRCore.h:310
Used in function arguments when None should resolve to the current context manager set instance.
Definition IRCore.h:537
Used in function arguments when None should resolve to the current context manager set instance.
Definition IRCore.h:291
PyAttribute(PyMlirContextRef contextRef, MlirAttribute attr)
Definition IRCore.h:1016
static void bind(nanobind::module_ &m, PyType_Slot *slots=nullptr)
Definition IRCore.h:1096
PyType(PyMlirContextRef contextRef, MlirType type)
Definition IRCore.h:889
MLIR_CAPI_EXPORTED MlirAttribute mlirFlatSymbolRefAttrGet(MlirContext ctx, MlirStringRef symbol)
Creates a flat symbol reference attribute in the given context referencing a symbol identified by the...
MLIR_CAPI_EXPORTED MlirStringRef mlirFlatSymbolRefAttrGetValue(MlirAttribute attr)
Returns the referenced symbol as a string reference.
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeIdentifiedNewGet(MlirContext ctx, MlirStringRef name, intptr_t nFieldTypes, MlirType const *fieldTypes, bool isPacked)
Creates an LLVM identified struct type with no body and a name starting with the given prefix.
Definition LLVM.cpp:177
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeIdentifiedGet(MlirContext ctx, MlirStringRef name)
Creates an LLVM identified struct type with no body.
Definition LLVM.cpp:173
MLIR_CAPI_EXPORTED bool mlirTypeIsALLVMPointerType(MlirType type)
Returns true if the type is an LLVM dialect pointer type.
Definition LLVM.cpp:38
MLIR_CAPI_EXPORTED MlirLogicalResult mlirLLVMStructTypeSetBody(MlirType structType, intptr_t nFieldTypes, MlirType const *fieldTypes, bool isPacked)
Sets the body of the identified struct if it hasn't been set yet.
Definition LLVM.cpp:187
MLIR_CAPI_EXPORTED unsigned mlirLLVMArrayTypeGetNumElements(MlirType type)
Returns the number of elements in the llvm.array type.
Definition LLVM.cpp:72
MLIR_CAPI_EXPORTED bool mlirTypeIsALLVMArrayType(MlirType type)
Returns true if the type is an LLVM dialect array type.
Definition LLVM.cpp:52
MLIR_CAPI_EXPORTED MlirStringRef mlirLLVMStructTypeGetName(void)
Definition LLVM.cpp:122
MLIR_CAPI_EXPORTED MlirStringRef mlirLLVMFunctionTypeGetName(void)
Definition LLVM.cpp:84
MLIR_CAPI_EXPORTED MlirTypeID mlirLLVMMDFuncAttrGetTypeID(void)
Returns the TypeID of MDFuncAttr.
Definition LLVM.cpp:593
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMMDStringAttrGet(MlirContext ctx, MlirStringRef value)
Creates an LLVM MDStringAttr.
Definition LLVM.cpp:550
MLIR_CAPI_EXPORTED MlirType mlirLLVMFunctionTypeGetInput(MlirType type, intptr_t pos)
Returns the pos-th input type.
Definition LLVM.cpp:100
MLIR_CAPI_EXPORTED MlirType mlirLLVMPointerTypeGet(MlirContext ctx, unsigned addressSpace)
Creates an llvm.ptr type.
Definition LLVM.cpp:26
MLIR_CAPI_EXPORTED MlirType mlirLLVMArrayTypeGetElementType(MlirType type)
Returns the element type of the llvm.array type.
Definition LLVM.cpp:68
MLIR_CAPI_EXPORTED bool mlirLLVMFunctionTypeIsVarArg(MlirType type)
Returns true if the function type is variadic.
Definition LLVM.cpp:110
MLIR_CAPI_EXPORTED bool mlirLLVMStructTypeIsLiteral(MlirType type)
Returns true if the type is a literal (unnamed) LLVM struct type.
Definition LLVM.cpp:126
MLIR_CAPI_EXPORTED MlirStringRef mlirLLVMMDStringAttrGetValue(MlirAttribute attr)
Returns the string value of an LLVM MDStringAttr.
Definition LLVM.cpp:563
MLIR_CAPI_EXPORTED MlirType mlirLLVMArrayTypeGet(MlirType elementType, unsigned numElements)
Creates an llvm.array type.
Definition LLVM.cpp:60
MLIR_CAPI_EXPORTED MlirStringRef mlirLLVMStructTypeGetIdentifier(MlirType type)
Returns the identifier of the identified struct.
Definition LLVM.cpp:142
MLIR_CAPI_EXPORTED MlirTypeID mlirLLVMArrayTypeGetTypeID(void)
Definition LLVM.cpp:56
MLIR_CAPI_EXPORTED bool mlirLLVMStructTypeIsOpaque(MlirType type)
Returns true is the struct is explicitly opaque (will not have a body) or uninitialized (will eventua...
Definition LLVM.cpp:146
MLIR_CAPI_EXPORTED bool mlirLLVMStructTypeIsPacked(MlirType type)
Returns true if the struct is packed.
Definition LLVM.cpp:138
MLIR_CAPI_EXPORTED intptr_t mlirLLVMStructTypeGetNumElementTypes(MlirType type)
Returns the number of fields in the struct.
Definition LLVM.cpp:130
MLIR_CAPI_EXPORTED bool mlirLLVMAttrIsAMDStringAttr(MlirAttribute attr)
Returns true if the attribute is an LLVM MDStringAttr.
Definition LLVM.cpp:555
MLIR_CAPI_EXPORTED bool mlirLLVMAttrIsAMDConstantAttr(MlirAttribute attr)
Returns true if the attribute is an LLVM MDConstantAttr.
Definition LLVM.cpp:572
MLIR_CAPI_EXPORTED MlirTypeID mlirLLVMPointerTypeGetTypeID(void)
Definition LLVM.cpp:34
MLIR_CAPI_EXPORTED MlirTypeID mlirLLVMStructTypeGetTypeID(void)
Definition LLVM.cpp:118
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMMDFuncAttrGet(MlirContext ctx, MlirAttribute name)
Creates an LLVM MDFuncAttr referencing a function symbol.
Definition LLVM.cpp:584
MLIR_CAPI_EXPORTED intptr_t mlirLLVMFunctionTypeGetNumInputs(MlirType type)
Returns the number of input types.
Definition LLVM.cpp:96
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeGetElementType(MlirType type, intptr_t position)
Returns the positions-th field of the struct.
Definition LLVM.cpp:134
MLIR_CAPI_EXPORTED MlirStringRef mlirLLVMArrayTypeGetName(void)
Definition LLVM.cpp:64
MLIR_CAPI_EXPORTED intptr_t mlirLLVMMDNodeAttrGetNumOperands(MlirAttribute attr)
Returns the number of operands in an LLVM MDNodeAttr.
Definition LLVM.cpp:617
MLIR_CAPI_EXPORTED MlirStringRef mlirLLVMPointerTypeGetName(void)
Definition LLVM.cpp:30
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeOpaqueGet(MlirContext ctx, MlirStringRef name)
Definition LLVM.cpp:169
MLIR_CAPI_EXPORTED MlirType mlirLLVMFunctionTypeGet(MlirType resultType, intptr_t nArgumentTypes, MlirType const *argumentTypes, bool isVarArg)
Creates an llvm.func type.
Definition LLVM.cpp:76
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMMDConstantAttrGet(MlirContext ctx, MlirAttribute valueAttr)
Creates an LLVM MDConstantAttr wrapping an attribute.
Definition LLVM.cpp:567
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeLiteralGet(MlirContext ctx, intptr_t nFieldTypes, MlirType const *fieldTypes, bool isPacked)
Creates an LLVM literal (unnamed) struct type.
Definition LLVM.cpp:150
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMMDFuncAttrGetName(MlirAttribute attr)
Returns the symbol name of an LLVM MDFuncAttr.
Definition LLVM.cpp:597
MLIR_CAPI_EXPORTED MlirTypeID mlirLLVMMDConstantAttrGetTypeID(void)
Returns the TypeID of MDConstantAttr.
Definition LLVM.cpp:576
MLIR_CAPI_EXPORTED MlirTypeID mlirLLVMMDNodeAttrGetTypeID(void)
Returns the TypeID of MDNodeAttr.
Definition LLVM.cpp:613
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMMDConstantAttrGetValue(MlirAttribute attr)
Returns the attribute value of an LLVM MDConstantAttr.
Definition LLVM.cpp:580
MLIR_CAPI_EXPORTED bool mlirTypeIsALLVMFunctionType(MlirType type)
Returns true if the type is an LLVM dialect function type.
Definition LLVM.cpp:88
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMMDNodeAttrGetOperand(MlirAttribute attr, intptr_t index)
Returns the operand at the given index of an LLVM MDNodeAttr.
Definition LLVM.cpp:621
MLIR_CAPI_EXPORTED bool mlirLLVMAttrIsAMDNodeAttr(MlirAttribute attr)
Returns true if the attribute is an LLVM MDNodeAttr.
Definition LLVM.cpp:609
MLIR_CAPI_EXPORTED bool mlirTypeIsALLVMStructType(MlirType type)
Returns true if the type is an LLVM dialect struct type.
Definition LLVM.cpp:114
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMMDNodeAttrGet(MlirContext ctx, intptr_t nOperands, MlirAttribute const *operands)
Creates an LLVM MDNodeAttr.
Definition LLVM.cpp:601
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeLiteralGetChecked(MlirLocation loc, intptr_t nFieldTypes, MlirType const *fieldTypes, bool isPacked)
Creates an LLVM literal (unnamed) struct type if possible.
Definition LLVM.cpp:159
MLIR_CAPI_EXPORTED bool mlirLLVMAttrIsAMDFuncAttr(MlirAttribute attr)
Returns true if the attribute is an LLVM MDFuncAttr.
Definition LLVM.cpp:589
MLIR_CAPI_EXPORTED MlirTypeID mlirLLVMFunctionTypeGetTypeID(void)
Returns the TypeID of an LLVM function type.
Definition LLVM.cpp:92
MLIR_CAPI_EXPORTED MlirType mlirLLVMFunctionTypeGetReturnType(MlirType type)
Returns the return type of the function type.
Definition LLVM.cpp:106
MLIR_CAPI_EXPORTED unsigned mlirLLVMPointerTypeGetAddressSpace(MlirType pointerType)
Returns address space of llvm.ptr.
Definition LLVM.cpp:42
MLIR_CAPI_EXPORTED MlirTypeID mlirLLVMMDStringAttrGetTypeID(void)
Returns the TypeID of MDStringAttr.
Definition LLVM.cpp:559
static bool mlirTypeIsNull(MlirType type)
Checks whether a type is null.
Definition IR.h:1165
MLIR_CAPI_EXPORTED MlirContext mlirLocationGetContext(MlirLocation location)
Gets the context that a location was created with.
Definition IR.cpp:410
static MlirStringRef mlirStringRefCreate(const char *str, size_t length)
Constructs a string reference from the pointer and length.
Definition Support.h:87
static bool mlirLogicalResultIsSuccess(MlirLogicalResult res)
Checks if the given logical result represents a success.
Definition Support.h:127
The OpAsmOpInterface, see OpAsmInterface.td for more details.
Definition CallGraph.h:229
static void populateDialectLLVMSubmodule(nanobind::module_ &m)
Include the generated interface declarations.
A logical result value, essentially a boolean with named states.
Definition Support.h:121
A pointer to a sized fragment of a string, not necessarily null-terminated.
Definition Support.h:78
const char * data
Pointer to the first symbol.
Definition Support.h:79
size_t length
Length of the fragment.
Definition Support.h:80
static constexpr GetTypeIDFunctionTy getTypeIdFunction
static constexpr GetTypeIDFunctionTy getTypeIdFunction
static constexpr GetTypeIDFunctionTy getTypeIdFunction
static constexpr GetTypeIDFunctionTy getTypeIdFunction