diff options
| author | gingerBill <bill@gingerbill.org> | 2018-05-12 17:39:04 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-05-12 17:39:04 +0100 |
| commit | 830f4f540fdbe30b22e93540249e61c1d1521f9b (patch) | |
| tree | c48704a31f31efdbe7645d02f86430b025079a82 /src/ir_print.cpp | |
| parent | 56ff5496bc81ca2ccce00f46d9477c6d559ee5b0 (diff) | |
`typeid`
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index e24859413..435924f06 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -342,6 +342,7 @@ void ir_print_type(irFileBuffer *f, irModule *m, Type *t, bool in_struct) { case Basic_string: ir_write_str_lit(f, "%..string"); return; case Basic_cstring: ir_write_str_lit(f, "i8*"); return; + case Basic_typeid: ir_write_str_lit(f, "%..typeid"); return; } break; @@ -1750,6 +1751,12 @@ void print_llvm_ir(irGen *ir) { ir_print_type(f, m, t_type_info_ptr); ir_write_str_lit(f, "} ; Basic_any\n"); + ir_print_encoded_local(f, str_lit("..typeid")); + ir_write_str_lit(f, " = type "); + ir_print_type(f, m, t_uintptr); + ir_write_str_lit(f, "; Basic_typeid\n"); + + ir_write_str_lit(f, "declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone \n"); ir_write_byte(f, '\n'); |