Relative pointers in old backend

This commit is contained in:
gingerBill
2020-05-15 17:52:09 +01:00
parent 90adf214d7
commit 95e8668b77
3 changed files with 102 additions and 16 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ LLVMValueRef llvm_cstring(lbModule *m, String const &str) {
lbAddr lb_addr(lbValue addr) {
lbAddr v = {lbAddr_Default, addr};
if (is_type_relative_pointer(type_deref(addr.type))) {
if (addr.type != nullptr && is_type_relative_pointer(type_deref(addr.type))) {
GB_ASSERT(is_type_pointer(addr.type));
v.kind = lbAddr_RelativePointer;
}