Start work on very basic LLVM debug type information

This commit is contained in:
gingerBill
2021-03-22 13:09:23 +00:00
parent fd7d70954e
commit 0355908af8
2 changed files with 312 additions and 33 deletions
+18
View File
@@ -78,6 +78,11 @@ struct lbAddr {
};
};
struct lbIncompleteDebugType {
Type *type;
LLVMMetadataRef metadata;
};
struct lbModule {
LLVMModuleRef mod;
LLVMContextRef ctx;
@@ -117,6 +122,8 @@ struct lbModule {
LLVMDIBuilderRef debug_builder;
LLVMMetadataRef debug_compile_unit;
Map<LLVMMetadataRef> debug_values; // Key: Pointer
Array<lbIncompleteDebugType> debug_incomplete_types;
};
struct lbGenerator {
@@ -480,3 +487,14 @@ enum : LLVMDWARFTypeEncoding {
LLVMDWARFTypeEncoding_LoUser = 128,
LLVMDWARFTypeEncoding_HiUser = 255
};
enum {
DW_TAG_array_type = 1,
DW_TAG_enumeration_type = 4,
DW_TAG_structure_type = 19,
DW_TAG_union_type = 23,
DW_TAG_vector_type = 259,
DW_TAG_subroutine_type = 21,
DW_TAG_inheritance = 28,
};