mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-21 18:26:51 +00:00
Preserve type sugar in ArrayType, ConstType, and PointerType. (#5235)
Each of these types takes another type as an operand. Instead of storing that other type as a `TypeId`, store it as an `InstId` so that we can track how it was written, not only its canonical form. The canonical constant values of these types continue to store the canonical constant values of their operands, as normal. --------- Co-authored-by: Dana Jansens <danakj@orodu.net>
This commit is contained in:
1 parent
164310c6b8
commit
bba32900c3
141 files changed
+535
-475
No files matched your search
+1
-1
@@ -82,7 +82,7 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [concrete = constants.%array_type]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32.loc11_17 [concrete = constants.%array_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %arr: %array_type = bind_name arr, %arr.param
|
||||
// CHECK:STDOUT: %i.param: %i32 = value_param call_param1
|
||||
|
||||
Reference in new issue
Block a user