mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-15 00:13:43 +00:00
Replace _llvm_* workaround in the scheduler with //go:linkname
This also removes the need for the _llvm_ special case in the compiler. And it makes the scheduler code a whole lot nicer!
This commit is contained in:
@@ -176,12 +176,7 @@ func (f *Function) LinkName() string {
|
||||
// Name CGo functions directly.
|
||||
return name
|
||||
} else {
|
||||
name := f.fn.RelString(nil)
|
||||
if f.fn.Pkg.Pkg.Path() == "runtime" && strings.HasPrefix(f.fn.Name(), "_llvm_") {
|
||||
// Special case for LLVM intrinsics in the runtime.
|
||||
name = "llvm." + strings.Replace(f.fn.Name()[len("_llvm_"):], "_", ".", -1)
|
||||
}
|
||||
return name
|
||||
return f.fn.RelString(nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user