summaryrefslogtreecommitdiff
path: root/TypeManager.hh
diff options
context:
space:
mode:
authorNagi5Yeq <wu@x-nagi.com>2020-05-31 13:11:44 +0800
committerNagi5Yeq <wu@x-nagi.com>2020-05-31 13:11:44 +0800
commit4a5bc55769804d003d6cd9f8c16eefb76bb53d1b (patch)
tree365756351275152391a812440f6a76b9f92cc854 /TypeManager.hh
parentbd44c9eaef1f4dcbbd98d4489885566b6c7e5138 (diff)
full support of array, pointer and record stuffs
Diffstat (limited to 'TypeManager.hh')
-rw-r--r--TypeManager.hh6
1 files changed, 5 insertions, 1 deletions
diff --git a/TypeManager.hh b/TypeManager.hh
index 13a98a1..099b505 100644
--- a/TypeManager.hh
+++ b/TypeManager.hh
@@ -34,8 +34,11 @@ class TypeManager {
GetPointerType(std::shared_ptr<Type> ElementType,
const char* CustomName = nullptr);
- // array types and function types are considered unique, unless use type
+ // record, array and function types are considered unique, unless use type
// alias, you can't get the same type as previous call to this function.
+ std::shared_ptr<RecordType>
+ CreateRecordType(const std::vector<RecordMember>& members);
+
std::shared_ptr<ArrayType>
CreateArrayType(std::shared_ptr<Type> ElementType,
std::shared_ptr<ExprNode> start,
@@ -63,6 +66,7 @@ class TypeManager {
std::map<std::shared_ptr<Type>, std::shared_ptr<PointerType>> PointerTypes_;
std::vector<std::shared_ptr<FunctionType>> FunctionTypes_;
std::vector<std::shared_ptr<ArrayType>> ArrayTypes_;
+ std::vector<std::shared_ptr<RecordType>> RecordTypes_;
// if we are porting to some 64-bit machines, we can change these types to
// 64-bit type, in order to make pointers behave correctly