I need to tell the pass to look out for a specific function in the file. And I want to specify which function to look out for 'on the go' i.e when I run the pass. Any idea how I can do that? It's sort of like passing arguments to a function in theory.
Asked
Active
Viewed 1,158 times
1 Answers
3
Add a command line option using cl::opt<string>
and set it when running your pass.
Alternatively, if you are producing an IR from C or C++ using clang, you can utilize __attribute((__annotate__(("foo"))))
to mark functions you are interested in.

arrowd
- 33,231
- 8
- 79
- 110