cl: supports decl: <param>
This commit is contained in:
@@ -26,6 +26,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -74,7 +75,7 @@ func decodeLinkFile(llFile string) (data []byte, err error) {
|
||||
return
|
||||
}
|
||||
defer zipf.Close()
|
||||
f, err := zipf.Open("llgo_autogen.ll")
|
||||
f, err := zipf.Open(filepath.Base(llFile))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -105,6 +105,8 @@ func pkgKind(v string) (int, string) {
|
||||
return PkgLinkExtern, v[5:]
|
||||
} else if strings.HasPrefix(v, "py.") { // "py.<module>"
|
||||
return PkgPyModule, v[3:]
|
||||
} else if strings.HasPrefix(v, "decl:") { // "decl: <param>"
|
||||
return PkgDeclOnly, v[5:]
|
||||
}
|
||||
}
|
||||
return PkgLLGo, ""
|
||||
|
||||
Reference in New Issue
Block a user