From 7be79d81f90c314ddce0ea82c3db099a1ea85e9b Mon Sep 17 00:00:00 2001 From: Li Jie Date: Sun, 16 Feb 2025 18:41:51 +0800 Subject: [PATCH] ssa: uniform byte and uint8 name on different platforms --- compiler/ssa/abi/abi.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/ssa/abi/abi.go b/compiler/ssa/abi/abi.go index c562fd29..014aa6b7 100644 --- a/compiler/ssa/abi/abi.go +++ b/compiler/ssa/abi/abi.go @@ -239,7 +239,11 @@ func FullName(pkg *types.Package, name string) string { // BasicName returns the ABI type name for the specified basic type. func BasicName(t *types.Basic) string { - return "_llgo_" + t.Name() + name := t.Name() + if name == "byte" { + name = "uint8" + } + return "_llgo_" + name } // FuncName returns the ABI type name for the specified function type.