invalid type error

39 views
Skip to first unread message

Arpit Aggarwal

unread,
Jun 4, 2017, 5:46:58 AM6/4/17
to llgo-dev
Hi all,

I am getting the following error when I try to generate assembly through the llvm IR (generated through llgo)
(command i used : llc channels.ll -o channels.o )


llc: channels.ll:17:44: error: invalid type for global variable
@__go_type_hash_identity = external global i64 (i8*, i64)

Channels.go

package main

// import "fmt"
// import "time"

func worker(done chan bool) {
    // fmt.Print("working...")
    // time.Sleep(time.Second)
    // fmt.Println("done")

    // send true to done
    done <- true
}

func main() {

    done := make(chan bool, 1)
    go worker(done)

    //wait for worker to send done
    <-done
}

I have also attached the go program and its IR.

What is the reason for this error and how it can be resolved?
Thanks in advance!

Regards
Arpit

Arpit Aggarwal

unread,
Jun 4, 2017, 5:48:56 AM6/4/17
to llgo-dev
Sorry, forgot to add the files earlier.
PFA
channels.ll
channels.go

Peter Collingbourne

unread,
Jun 4, 2017, 6:14:36 PM6/4/17
to llgo...@googlegroups.com
Hi Arpit,

This was a bug in llgo's IR generator, which is now fixed as of r304689.

Thanks,
Peter

--
You received this message because you are subscribed to the Google Groups "llgo-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to llgo-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-- 
Peter

Arpit Aggarwal

unread,
Jun 6, 2017, 1:26:04 AM6/6/17
to llgo-dev

Thanks Peter!
One thing I want to ask is, whether the latest version compiles, because I had issues installing it few days back, so using an older version.
What is the best way to install llgo(is it using the llgo-README)? Should I compile the latest llgo with older llvm I am working or update all?
To unsubscribe from this group and stop receiving emails from it, send an email to llgo-dev+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-- 
Peter
Reply all
Reply to author
Forward
0 new messages