another llvm workaround for getelementptr

This commit is contained in:
Andrew Kelley
2018-02-27 10:00:07 -05:00
parent 4e43bde924
commit c2f5634fb3
3 changed files with 81 additions and 6 deletions

View File

@@ -5821,3 +5821,11 @@ bool type_is_global_error_set(TypeTableEntry *err_set_type) {
uint32_t get_coro_frame_align_bytes(CodeGen *g) {
return g->pointer_size_bytes * 2;
}
uint32_t workaround_struct_gep_hash(WorkaroundStructGEPId x) {
return ptr_hash(x.struct_ptr_type) ^ x.index;
}
bool workaround_struct_gep_eq(WorkaroundStructGEPId a, WorkaroundStructGEPId b) {
return a.struct_ptr_type == b.struct_ptr_type && a.index == b.index;
}