mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:30:12 +01:00
Change Namespace formatting to use the scope's name. (#3782)
This change only affects the generated IR, but I think it's cleaning up an existing issue with namespace name printing.
This commit is contained in:
@@ -28,10 +28,10 @@ fn F() -> bool {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .NS = %.loc7
|
||||
// CHECK:STDOUT: .NS = %NS
|
||||
// CHECK:STDOUT: .F = %F
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %NS: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %F: <function> = fn_decl @F [template] {
|
||||
// CHECK:STDOUT: %return.var: ref bool = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
@@ -41,7 +41,7 @@ fn F() -> bool {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc16_16: bool = bool_literal false [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc16_9: <error> = bind_alias <invalid>, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %NS.ref: <namespace> = name_ref NS, file.%.loc7 [template = file.%.loc7]
|
||||
// CHECK:STDOUT: %NS.ref: <namespace> = name_ref NS, file.%NS [template = file.%NS]
|
||||
// CHECK:STDOUT: %a.ref: <error> = name_ref a, <error> [template = <error>]
|
||||
// CHECK:STDOUT: return <error>
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+4
-4
@@ -21,19 +21,19 @@ fn F() -> NS.a {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .NS = %.loc7
|
||||
// CHECK:STDOUT: .NS = %NS
|
||||
// CHECK:STDOUT: .F = %F
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: %NS: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .a = %a
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: type = bind_alias a, bool [template = bool]
|
||||
// CHECK:STDOUT: %NS.ref.loc10: <namespace> = name_ref NS, %.loc7 [template = %.loc7]
|
||||
// CHECK:STDOUT: %NS.ref.loc10: <namespace> = name_ref NS, %NS [template = %NS]
|
||||
// CHECK:STDOUT: %a.ref.loc10: type = name_ref a, %a [template = bool]
|
||||
// CHECK:STDOUT: %.loc10: bool = bool_literal false [template = constants.%.1]
|
||||
// CHECK:STDOUT: %b: bool = bind_name b, %.loc10
|
||||
// CHECK:STDOUT: %F: <function> = fn_decl @F [template] {
|
||||
// CHECK:STDOUT: %NS.ref.loc12: <namespace> = name_ref NS, %.loc7 [template = %.loc7]
|
||||
// CHECK:STDOUT: %NS.ref.loc12: <namespace> = name_ref NS, %NS [template = %NS]
|
||||
// CHECK:STDOUT: %a.ref.loc12: type = name_ref a, %a [template = bool]
|
||||
// CHECK:STDOUT: %return.var: ref bool = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
Reference in New Issue
Block a user