ssa: add llgo:link support to Builder.abiMthd

This commit is contained in:
Aofei Sheng
2024-08-03 08:35:19 +08:00
parent 0bd259403c
commit 482f796bad
4 changed files with 87 additions and 0 deletions

View File

@@ -586,6 +586,7 @@ type aPackage struct {
named map[types.Type]Expr
afterb unsafe.Pointer
patch func(types.Type) types.Type
fnlink func(string) string
iRoutine int
}
@@ -658,6 +659,11 @@ func (p Package) SetPatch(fn func(types.Type) types.Type) {
p.patch = fn
}
// SetResolveLinkname sets a function to resolve linkname.
func (p Package) SetResolveLinkname(fn func(string) string) {
p.fnlink = fn
}
// -----------------------------------------------------------------------------
func (p Package) afterBuilder() Builder {