Add new pragma

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Add new pragma

Pisit Makpaisit
I know that if I want to add new pragma into clang, I have to inherit from PragmaHandler. but what clang option that can call pragma processor. I try to use -fpreprocessor but not work.


--
Remixman (Pisit Makpaisit)

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Add new pragma

Michael Spencer-2
On Tue, Jun 22, 2010 at 4:02 AM, Pisit Makpaisit <[hidden email]> wrote:
> I know that if I want to add new pragma into clang, I have to inherit from
> PragmaHandler. but what clang option that can call pragma processor. I try
> to use -fpreprocessor but not work.

-fsyntax-only, or -E.

- Michael Spencer
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Add new pragma

Pisit Makpaisit
Thank you. 

I test by debug and break in Preprocessor::RegisterBuiltinPragmas but it doesn't call.
This is command that I use. "clang -fsyntax-only wp1.c"

On Tue, Jun 22, 2010 at 7:24 PM, Michael Spencer <[hidden email]> wrote:
On Tue, Jun 22, 2010 at 4:02 AM, Pisit Makpaisit <[hidden email]> wrote:
> I know that if I want to add new pragma into clang, I have to inherit from
> PragmaHandler. but what clang option that can call pragma processor. I try
> to use -fpreprocessor but not work.

-fsyntax-only, or -E.

- Michael Spencer



--
Remixman (Pisit Makpaisit)

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Add new pragma

Michael Spencer-2
On Tue, Jun 22, 2010 at 10:48 PM, Pisit Makpaisit <[hidden email]> wrote:
> Thank you.
> I test by debug and break in Preprocessor::RegisterBuiltinPragmas but it
> doesn't call.
> This is command that I use. "clang -fsyntax-only wp1.c"

Hmm, that gets called for me with that command. What platform are you on?

Here's a sample of a very simple pragma I added.

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-June/009516.html

- Michael Spencer

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Add new pragma

Pisit Makpaisit
Thank you again. It's work, but I made some mistakes in debugging.

On Wed, Jun 23, 2010 at 11:56 AM, Michael Spencer <[hidden email]> wrote:
On Tue, Jun 22, 2010 at 10:48 PM, Pisit Makpaisit <[hidden email]> wrote:
> Thank you.
> I test by debug and break in Preprocessor::RegisterBuiltinPragmas but it
> doesn't call.
> This is command that I use. "clang -fsyntax-only wp1.c"

Hmm, that gets called for me with that command. What platform are you on?

Here's a sample of a very simple pragma I added.

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-June/009516.html

- Michael Spencer



--
Remixman (Pisit Makpaisit)

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev