mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-25 18:11:13 +00: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:
1 parent
84bc8cc4bf
commit
71aa4a45be
206 files changed
+1050
-921
No files matched your search
@@ -24,13 +24,13 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Echo(%a: {}) -> {} {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: {} = name_reference "a", %a
|
||||
// CHECK:STDOUT: %a.ref: {} = name_reference a, %a
|
||||
// CHECK:STDOUT: return %a.ref
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Main() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Echo.ref: <function> = name_reference "Echo", file.%Echo
|
||||
// CHECK:STDOUT: %Echo.ref: <function> = name_reference Echo, file.%Echo
|
||||
// CHECK:STDOUT: %.loc12_9.1: {} = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc12_9.2: {} = struct_value %.loc12_9.1, ()
|
||||
// CHECK:STDOUT: %.loc12_7: init {} = call %Echo.ref(%.loc12_9.2)
|
||||
|
||||
Reference in new issue
Block a user