Daniel Dunbar | dd63b28 | 2009-12-11 23:04:35 +0000 | [diff] [blame] | 1 | This is a simple example demonstrating how to use clang's facility for |
Daniel Dunbar | ebe6862 | 2009-12-01 03:15:49 +0000 | [diff] [blame] | 2 | providing AST consumers using a plugin. |
| 3 | |
Nico Weber | 6d733ed | 2011-01-26 21:28:52 +0000 | [diff] [blame] | 4 | Build the plugin by running `make` in this directory. |
Daniel Dunbar | ebe6862 | 2009-12-01 03:15:49 +0000 | [diff] [blame] | 5 | |
| 6 | Once the plugin is built, you can run it using: |
| 7 | -- |
Nico Weber | 6d733ed | 2011-01-26 21:28:52 +0000 | [diff] [blame] | 8 | Linux: |
| 9 | $ clang -cc1 -load ../../Debug+Asserts/lib/libPrintFunctionNames.so -plugin print-fns some-input-file.c |
| 10 | |
| 11 | Mac: |
| 12 | $ clang -cc1 -load ../../Debug+Asserts/lib/libPrintFunctionNames.dylib -plugin print-fns some-input-file.c |