Stop creating invalid clang identifier names. (#6578)

This doesn't appear to be causing any problems, but seems worth avoiding
anyway.

---------

Co-authored-by: Carbon Infra Bot <carbon-external-infra@google.com>
This commit is contained in:
Richard Smith
2026-01-11 21:06:22 +00:00
committed by GitHub
co-authored by Carbon Infra Bot
parent 935ccce2a6
commit f5bb43bced
3 changed files with 241 additions and 203 deletions
@@ -211,12 +211,12 @@ fn MyF(a: Cpp.X, b: Cpp.X) -> Cpp.X {
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %X: type = class_type @X [concrete]
// CHECK:STDOUT: %ptr.1f9: type = ptr_type %X [concrete]
// CHECK:STDOUT: %operator+__carbon_thunk.type: type = fn_type @operator+__carbon_thunk [concrete]
// CHECK:STDOUT: %operator+__carbon_thunk: %operator+__carbon_thunk.type = struct_value () [concrete]
// CHECK:STDOUT: %operator_Plus__carbon_thunk.type: type = fn_type @operator_Plus__carbon_thunk [concrete]
// CHECK:STDOUT: %operator_Plus__carbon_thunk: %operator_Plus__carbon_thunk.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %operator+__carbon_thunk.decl: %operator+__carbon_thunk.type = fn_decl @operator+__carbon_thunk [concrete = constants.%operator+__carbon_thunk] {
// CHECK:STDOUT: %operator_Plus__carbon_thunk.decl: %operator_Plus__carbon_thunk.type = fn_decl @operator_Plus__carbon_thunk [concrete = constants.%operator_Plus__carbon_thunk] {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: } {
// CHECK:STDOUT: <elided>
@@ -233,8 +233,8 @@ fn MyF(a: Cpp.X, b: Cpp.X) -> Cpp.X {
// CHECK:STDOUT: %.loc11_14: ref %X = value_as_ref %b.ref
// CHECK:STDOUT: %addr.loc11_12.2: %ptr.1f9 = addr_of %.loc11_14
// CHECK:STDOUT: %addr.loc11_12.3: %ptr.1f9 = addr_of %.loc9_34.1
// CHECK:STDOUT: %operator+__carbon_thunk.call: init %empty_tuple.type = call imports.%operator+__carbon_thunk.decl(%addr.loc11_12.1, %addr.loc11_12.2, %addr.loc11_12.3)
// CHECK:STDOUT: %.loc11_12: init %X = in_place_init %operator+__carbon_thunk.call, %.loc9_34.1
// CHECK:STDOUT: %operator_Plus__carbon_thunk.call: init %empty_tuple.type = call imports.%operator_Plus__carbon_thunk.decl(%addr.loc11_12.1, %addr.loc11_12.2, %addr.loc11_12.3)
// CHECK:STDOUT: %.loc11_12: init %X = in_place_init %operator_Plus__carbon_thunk.call, %.loc9_34.1
// CHECK:STDOUT: return %.loc11_12 to %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: