使用cl::opt<string>添加命令行选项,并在运行您的pass时设置它。 另外,如果你正在使用clang从C或C++生成IR,可以利用__attribute((__annotate__(("foo"))))来标记您感兴趣的函数。