Redirecting file to stdin for bugpoint

Hi all,

According to bugpoint’s document[1], I should be able to use the “-input” option to redirect a file to the stdin for the bitcode that is under debug.

However when I try it with sqlite3:

bugpoint x.bc -mem2reg -llc-safe –input commands --args -init sqlite3rc :memory:

I got:

bugpoint: commands:1:1: error: expected top-level entity
.read test1.sql

It looks like that bugpoint is parsing “commands” as llvm bitcode, which is confusing.

Maybe I am not using this option correctly? Any hint is appreciated.