Permalink
Browse files

Add module verification to factorial.go.

  • Loading branch information...
1 parent 967911a commit ea16d56229749bb0bdb1eb2303f90d50d09f09fe @nsf nsf committed Oct 15, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 examples/factorial/factorial.go
@@ -49,7 +49,11 @@ func test() {
res.AddIncoming(phi_vals, phi_blocks)
builder.CreateRet(res)
- //LLVMVerifyModule(mod, LLVMAbortProcessAction, &error);
+ err := llvm.VerifyModule(mod, llvm.ReturnStatusAction)
+ if err != nil {
+ fmt.Println(err)
+ return
+ }
engine, err := llvm.NewJITCompiler(mod, 2)
if err != nil {

0 comments on commit ea16d56

Please sign in to comment.