How to configure the functionPass manager to omit some functions in a module input?

Hi all, now I am using LLVM to draw a program dependence graph. In my ModulePass I hope to omit some special functions like “main” and only run some special functions.

For example, as shown in the following dump result, how can i selectively omit function “@const_expr” in the input module? Is there a general way to run some function only but omit others? Thanks!

Stack dump:
0.  Program arguments: opt --load mypass.so -mypass --debug-pass=Structure 
1.  Running pass 'Function Pass Manager' on module '<stdin>'.
2.  Running pass 'My test analysis' on function '@const_expr'
Segmentation fault (core dumped)

Dear Shen,

This isn't sufficient information to help you fix your problem. Is @const_expr a function, and LLVM constant expression, or something else? If it's a function, did you verify that it has a body (i.e., it's not a function declaration)?

Regards,

John Criswell