On Tue, Feb 21, 2017 at 9:15 AM, Arpit Aggarwal <arpit94.i...@gmail.com> wrote:
>
> I am doing a project in which I need Go compiler's intermediate
> representation(IR) (which is semantics preserving and I can get all all info
> like line number and data type and other features) (human readable) to
> convert to another IR of a tool.
> I am new to Golang.
> Can anybody tell me how can I generate it from the Go compiler.
> I also tried this blog but the new versions of go compiler doesn't support
> this.
> I also tried llgo but was able to generate llvm-ir from llgo's docker image
> available and not able to build llgo myself.
> Any help would be highly appreciated.

Unfortunately there is no simple way to do this using the Go compiler.

If you don't actually need the Go compiler itself, then you should use
the go/types package.  That is a complete semantics preserving
representation of a Go program with position and type information.

Ian

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to