internal/pkg: input iterator via IR cache

Primarily useful for garbage collection.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-31 14:19:27 +09:00
parent 4d017b1309
commit f398f71fa9
2 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
package rosa_test
import (
"testing"
"hakurei.app/internal/pkg"
"hakurei.app/internal/rosa"
)
func TestLLVMInputs(t *testing.T) {
const wantInputCount = 688
_, llvm := rosa.Native().Std().MustLoad(rosa.H("llvm"))
var n int
for range pkg.Inputs(llvm) {
n++
}
if n != wantInputCount {
t.Errorf("Inputs: %d, want %d", n, wantInputCount)
}
}