LLVM - What does '!NodePtr->isKnownSentinel(), function operator*' means? -


when execute following ir:

declare void @_puts(i32, ...)  define void @main() { entry:   %name = alloca i32   br i1 true, label %then, label %else  then:                                             ; preds = %entry   call void (i32, ...) @_puts(i32 1, i32 1234)   br label %end  else:                                             ; preds = %entry   br label %end  end:                                              ; preds = %else, %then   %if_val = phi i32 [ 1234, %then ], [ 0, %else ]  entry1:                                           ; no predecessors!   store i32 %if_val, i32* %name   %name2 = load i32, i32* %name   call void (i32, ...) @_puts(i32 1, i32 %name2)   ret void } 

i got following error message:

assertion failed: (!nodeptr->isknownsentinel()), function operator*, file /users/mac/llvm-source/llvm/include/llvm/adt/ilist_iterator.h, line 139.

abort trap: 6

what message means?

can explain me?

thanks lot.

the message refers sentinel node of simple_ilist, data structure used representing lists of functions in module, basic blocks in function, instructions in basic blocks, , on. sentinel node represents end of list , data member of such lists — rest inside objects constitute list ("i" "intrusive").

i guess message caused iterating on end of simple_ilist. 1 holding instructions in end block, because block malformed. can fix adding terminator:

end:                                              ; preds = %else, %then   %if_val = phi i32 [ 1234, %then ], [ 0, %else ]   br label %entry1 

Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -