aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_utility.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-11-05 16:43:53 +0000
committergingerBill <bill@gingerbill.org>2021-11-05 16:43:53 +0000
commit6be104e5215668aad05c68cb26e1dd9fe898fc11 (patch)
tree4ce49d00d4503610ee135a12c779053d60123b36 /src/llvm_backend_utility.cpp
parente95204908a12d4386ba9bda6de1fed7c73f66d29 (diff)
Make llvm backend code use `PtrMap`; remove dead code
Diffstat (limited to 'src/llvm_backend_utility.cpp')
-rw-r--r--src/llvm_backend_utility.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/llvm_backend_utility.cpp b/src/llvm_backend_utility.cpp
index ab50b8c1e..2ff54342a 100644
--- a/src/llvm_backend_utility.cpp
+++ b/src/llvm_backend_utility.cpp
@@ -401,7 +401,7 @@ lbValue lb_emit_or_return(lbProcedure *p, Ast *arg, TypeAndValue const &tv) {
GB_ASSERT(end_entity->token.string.len != 0);
// NOTE(bill): store the named values before returning
- lbValue found = map_must_get(&p->module->values, hash_entity(end_entity));
+ lbValue found = map_must_get(&p->module->values, end_entity);
lb_emit_store(p, found, rhs);
lb_build_return_stmt(p, {});
@@ -811,9 +811,9 @@ lbValue lb_address_from_load(lbProcedure *p, lbValue value) {
lbStructFieldRemapping lb_get_struct_remapping(lbModule *m, Type *t) {
t = base_type(t);
LLVMTypeRef struct_type = lb_type(m, t);
- auto *field_remapping = map_get(&m->struct_field_remapping, hash_pointer(struct_type));
+ auto *field_remapping = map_get(&m->struct_field_remapping, cast(void *)struct_type);
if (field_remapping == nullptr) {
- field_remapping = map_get(&m->struct_field_remapping, hash_pointer(t));
+ field_remapping = map_get(&m->struct_field_remapping, cast(void *)t);
}
GB_ASSERT(field_remapping != nullptr);
return *field_remapping;