Hi, It wasn't clear from your email exactly what you are doing or what the error was you encountered (grepping in the gollvm/LLVM sources didn't turn up any error code similar to "unable to locate ParamAttr enum"), but I think it is safe to say that this isn't a supported use case for gollvm, at least I don't know of anyone who is doing this sort of thing already.
Generating a *.ll IR file for each translation unit and then reading them all together sounds difficult, seems as though you would need some sort of very strong type unification in order to match up types that are common/shared among translation units. Have you tried doing this on C code, for example? Thanks, Than On Mon, May 10, 2021 at 8:09 AM ZHOU PERTER <pupile...@gmail.com> wrote: > Hi, > i want to use gollvm to produces a project llvm-ir > i use `go build -work -x . 1> transcript.txt 2>&1` and `egrep > '(WORK=|llvm-goc -c)' transcript.txt` > to ever `llvm-goc -c` command add `-S -emit-llvm` to produces .ll for each > .go file > then i use https://github.com/llir/llvm to transfer llvm ir to go > build-in struct,but llir only parse one file > for simple file it's ok > ``` > package main > import ( > "fmt" > ) > func main(){ > a := "hello_world" > fmt.Println(a) > } > but for multiple packages project the error `unable to locate ParamAttr > enum corresponding to "noundef"` occur when i only provide main.ll。 > any way to merger mutli .ll to one .ll or other method so that i can do > multiple > packages project data flow analysis? > Thankss, > PERTER > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/2c329707-bc0f-4603-9e98-199102280cecn%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/2c329707-bc0f-4603-9e98-199102280cecn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CA%2BUr55EHfONN3HJEf1CnvhQpC712dJKknkrtcVrXJG6tuwu%2B9A%40mail.gmail.com.