[DEBUG]OptCommandLineRegisteredInconsistency

写完pass以后,运行opt报错

λ opt -help
: CommandLine Error: Option 'mypass' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

排查了很多地方都没有找到解决的方法
突发奇想,于是干脆在注册的时候改变一下名称

INITIALIZE_PASS ( MyPass, "mypass0", "Print all function names.", false, false )

也就是把第二个参数从"mypass"改成"mypass0",这样就能跑起来了.

你可能感兴趣的:([DEBUG]OptCommandLineRegisteredInconsistency)