mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Distinguish between name IDs and string IDs in the type system. (#3341)
Add a `NameId` that is effectively just a wrapper around a `StringId`, with some additional predefined values for names that don't correspond to strings, such as the name of `self` or the function's return slot.
This commit is contained in:
@@ -30,7 +30,7 @@ fn Deref(n: i32) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Deref(%n: i32) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %n.ref: i32 = name_reference "n", %n
|
||||
// CHECK:STDOUT: %n.ref: i32 = name_reference n, %n
|
||||
// CHECK:STDOUT: %.loc11: ref <error> = dereference %n.ref
|
||||
// CHECK:STDOUT: %.loc15_5.1: () = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc15_5.2: () = tuple_value %.loc15_5.1, ()
|
||||
|
||||
Reference in New Issue
Block a user