mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 07:54:41 +01:00
Implement checking observe declarations (#6709)
This adds SemIR structs and implements building `observe` lists, as well as naming, formatting, and importing `observe` declarations. --------- Co-authored-by: Dana Jansens <danakj@orodu.net>
This commit is contained in:
co-authored by
Dana Jansens
parent
918bb9364f
commit
08385adeb5
@@ -40,6 +40,8 @@ fn Main() {
|
||||
// CHECK:STDOUT: fn @Foo() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !observes:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Main() {
|
||||
@@ -47,5 +49,7 @@ fn Main() {
|
||||
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo]
|
||||
// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref()
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !observes:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user