浏览代码

Disable `#raw_union` constants for the time being

gingerBill 2 周之前
父节点
当前提交
240b2f1819
共有 2 个文件被更改,包括 2 次插入7 次删除
  1. 0 6
      src/llvm_backend_proc.cpp
  2. 2 1
      src/types.cpp

+ 0 - 6
src/llvm_backend_proc.cpp

@@ -928,12 +928,6 @@ gb_internal lbValue lb_emit_call_internal(lbProcedure *p, lbValue value, lbValue
 							args[i] = LLVMBuildPointerCast(p->builder, args[i], param_type, "");
 							arg_type = param_type;
 							continue;
-						} else if (arg_kind == LLVMStructTypeKind) {
-							if (lb_sizeof(arg_type) == lb_sizeof(param_type)) {
-								args[i]	 = LLVMBuildBitCast(p->builder, args[i], param_type, "");
-								arg_type = param_type;
-								continue;
-							}
 						}
 					}
 				}

+ 2 - 1
src/types.cpp

@@ -2541,7 +2541,8 @@ gb_internal bool is_type_raw_union_constantable(Type *type) {
 			return false;
 		}
 	}
-	return true;
+	// return true;
+	return false; // Disable raw union constants for the time being
 }