Switch type literals to use builtin functions. (#3978)

Modifies the core package and literal handling to use factory functions
for standard type literals.

Updates function/builtin/import.carbon to stop depending on the prelude,
since it would list all the impls in the core file. Updates
alias/builtins.carbon to be failing (the type values cannot be aliased).
This commit is contained in:
Jon Ross-Perkins
2024-05-23 16:00:08 +00:00
committed by GitHub
parent 5c8fa6ad5c
commit 55300d1ebb
314 changed files with 12506 additions and 4323 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ fn F() {
// CHECK:STDOUT: ; ModuleID = 'address_of_field.carbon'
// CHECK:STDOUT: source_filename = "address_of_field.carbon"
// CHECK:STDOUT:
// CHECK:STDOUT: @struct.3.loc10_47 = internal constant { i32, i32 } { i32 1, i32 2 }
// CHECK:STDOUT: @struct.4.loc10_47 = internal constant { i32, i32 } { i32 1, i32 2 }
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @G(ptr)
// CHECK:STDOUT:
@@ -23,7 +23,7 @@ fn F() {
// CHECK:STDOUT: %s.var = alloca { i32, i32 }, align 8
// CHECK:STDOUT: %.loc10_46.2.a = getelementptr inbounds { i32, i32 }, ptr %s.var, i32 0, i32 0
// CHECK:STDOUT: %.loc10_46.4.b = getelementptr inbounds { i32, i32 }, ptr %s.var, i32 0, i32 1
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %s.var, ptr align 4 @struct.3.loc10_47, i64 8, i1 false)
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %s.var, ptr align 4 @struct.4.loc10_47, i64 8, i1 false)
// CHECK:STDOUT: %.loc11_7.b = getelementptr inbounds { i32, i32 }, ptr %s.var, i32 0, i32 1
// CHECK:STDOUT: call void @G(ptr %.loc11_7.b)
// CHECK:STDOUT: ret void