OLD | NEW |
---|---|
(Empty) | |
1 This is a directory for Clang plugins that are designed to do analysis and/or ma nipulation of PPAPI code. Clang is an open-source C front-end that allows you t o parse C, C++, or Objective-C code in to an abstract syntax tree (or AST) for p rocessing. | |
David Springer
2010/12/13 21:23:08
Nit: I don't know of any Style Guide for READMEs,
| |
2 | |
3 To use these plugins, you will need to get Clang. Clang is rapidly changing, so you may want to download and build it yourself. See the instructions here: | |
4 - http://clang.llvm.org/get_started.html | |
5 | |
6 To build the plugins, use the Makefile in this directory. If you want the provi ded Makefile to work out-of-the-box, in step 2 of the instructions at the above URL, you should do the following: | |
7 > mkdir ~/llvm | |
8 > cd ~/llvm | |
9 Now continue with the svn co command to check out llvm in ~/llvm/llvm. | |
10 | |
11 To run a plugin, use clang with the -cc1 -load and -plugin flags and an otherwis e normal build line. For example, to run liBPrintNamesAndSizes.so, if you curre ntly build like this: | |
12 g++ (build_options) | |
13 Run this from the command-line instead: | |
14 clang -cc1 -load ppapi/tests/clang/libPrintNamesAndSizes.so -plugin PrintNamesAn dSizes (build_options) | |
15 | |
16 Plugins: | |
17 PrintNamesAndSizes : print_names_and_sizes.cc | |
David Springer
2010/12/13 21:23:08
Suggestion: offset the individual plugin descripti
| |
18 Print information about all top-level type definitions. You probably won't need to run it by itself; instead see generate_ppapi_size_checks.py, which uses the plugin. | |
David Springer
2010/12/13 21:23:08
What information do I get? Example output?
| |
19 | |
20 Example command-line: | |
21 python generate_ppapi_size_checks.py --ppapi-root=/usr/local/google/chrome_bui ld/src/ppapi | |
22 python generate_ppapi_size_checks.py --help | |
David Springer
2010/12/13 21:23:08
Example output? Why would I use this particular p
| |
23 | |
24 | |
25 FindAffectedInterfaces : find_affected_interfaces.cc | |
26 Given typenames as parameters, print out all types that are affected (including function pointer types and structs containing affected function pointer types) i f the given type(s) change. This is meant to be used for determining what inter faces are affected by a change to a struct. | |
27 | |
28 Example command-line: | |
29 clang -cc1 -load ppapi/tests/clang/libFindAffectedInterfaces.so -plugin FindAf fectedInterfaces -I. ppapi/tests/all_includes.h -plugin-arg-FindAffectedInterfac es "struct PP_VideoCompressedDataBuffer_Dev" | |
30 clang -cc1 -load tests/clang/libFindAffectedInterfaces.so -plugin FindAffected Interfaces -I../ tests/all_c_includes.h -plugin-arg-FindAffectedInterfaces "stru ct PP_VideoCompressedDataBuffer_Dev,struct PP_Var" | |
31 | |
32 (This assumes that clang is in your path and you are running the plugin from the ppapi subdirectory in a chrome checkout). | |
David Springer
2010/12/13 21:23:08
"in a chrome checkout" - this fact is important en
| |
OLD | NEW |