[cfe-dev] Passing arguments to a custom clang pass

Santosh Nagarakatte santosh.nagarakatte at gmail.com
Wed Dec 15 09:03:52 PST 2010


Hi all,

I am writing a source to source translator for C using clang. I want
to pass extra arguments to my source to source translator.
What are the steps I need to follow to pass extra arguments to the pass?
I have added an option in Options.td. How does my source to source
translator check whether the option is specified.
I thought it is not necessary to define an option in CC1Option.td and
a FrontEndAction as this argument is just passed to my pass.

It will helpful if someone can point me to an existing example in
Clang or describe the steps needed.

Thanks,
Santosh



-- 
Santosh G Nagarakatte,
PhD Student,
Computer and Information Science Department
University of Pennsylvania,
Philadelphia-19104
http://www.cis.upenn.edu/~santoshn



More information about the cfe-dev mailing list