aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-03-01 17:36:08 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-03-01 17:36:08 -0500
commit26128396f3abaaba725642220b1fd34e281c8939 (patch)
tree17ab3f606a0c781d92e9113a3c5a79fc0574121c /src/ir.cpp
parente8dad624419cee8e106185e478969d4a3ca44f0a (diff)
downloadzig-26128396f3abaaba725642220b1fd34e281c8939.tar.gz
zig-26128396f3abaaba725642220b1fd34e281c8939.zip
gen-h: use the bare type names for now
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index f8f3de7598..a5a085ff09 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -18685,15 +18685,7 @@ static IrInstruction *ir_analyze_instruction_type_name(IrAnalyze *ira, IrInstruc
return ira->codegen->invalid_instruction;
if (!type_entry->cached_const_name_val) {
- Buf *name;
- if (is_container(type_entry)) {
- name = get_container_scope(type_entry)->bare_name;
- } else if (type_entry->id == ZigTypeIdOpaque) {
- name = type_entry->data.opaque.bare_name;
- } else {
- name = &type_entry->name;
- }
- type_entry->cached_const_name_val = create_const_str_lit(ira->codegen, name);
+ type_entry->cached_const_name_val = create_const_str_lit(ira->codegen, type_bare_name(type_entry));
}
IrInstruction *result = ir_const(ira, &instruction->base, nullptr);
copy_const_val(&result->value, type_entry->cached_const_name_val, true);