llvm-project/clang/examples/PrintFunctionNames
Daniel Dunbar 2be96746b4 Frontend: Change PluginASTAction::ParseArgs to take a CompilerInstance object
for use in reporting diagnostics.
 - We don't want to use the Action's own CompilerInstance, because that is only
   initialized during file processing and I like that invariant.

Also, if ParseArgs returns false then abandon execution.

Also, remove unused PluginASTAction::PrintHelp virtual method.

llvm-svn: 110039
2010-08-02 15:31:28 +00:00
..
CMakeLists.txt Teach the PrintFunctionNames example to be a proper module, so that 2010-06-08 19:23:49 +00:00
Makefile Use an export file. Plugins must export llvm::Registry symbols. 2010-07-26 21:12:10 +00:00
PrintFunctionNames.cpp Frontend: Change PluginASTAction::ParseArgs to take a CompilerInstance object 2010-08-02 15:31:28 +00:00
PrintFunctionNames.exports Use an export file. Plugins must export llvm::Registry symbols. 2010-07-26 21:12:10 +00:00
README.txt Fix -plugin command line argument syntax for clang -cc1 change. 2010-01-05 21:42:23 +00:00

README.txt

This is a simple example demonstrating how to use clang's facility for
providing AST consumers using a plugin.

You will probably need to build clang so that it exports all symbols (disable
TOOL_NO_EXPORT in the tools/clang Makefile).

Once the plugin is built, you can run it using:
--
$ clang -cc1 -load path/to/PrintFunctionNames.so -plugin print-fns some-input-file.c
--