mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 21:11:27 +01:00
Change TypeId to be a thin wrapper around ConstantId. (#4140)
This better follows the principle that types are simply constants of type `type`, and allows more uniform treatment of types as just another kind of constant from generics handling. Use a hash table to map from `TypeId` to information about the complete type. This makes basic operations on types a bit simpler, and operations that actually need to access the complete class information a bit more complex.
This commit is contained in:
@@ -15,13 +15,3 @@ fn F(T:! type) {
|
||||
|
||||
// CHECK:STDOUT: ; ModuleID = 'type_param.carbon'
|
||||
// CHECK:STDOUT: source_filename = "type_param.carbon"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: %type = type {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @F(%type %T) {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %p.var = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %.loc13_15 = load ptr, ptr %p.var, align 8
|
||||
// CHECK:STDOUT: %.loc13_14.2 = load {}, ptr %.loc13_15, align 1
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
Reference in New Issue
Block a user