[clang][NFC] Update CrossTranslationUnit.rst (#175730)
For PHC-based analysis, it's no longer necessary to manually edit the file name in externalDefMap.txt.
This commit is contained in:
parent
6f69d68a9e
commit
5ab2df3469
@ -85,21 +85,9 @@ source files in format `<USR-Length>:<USR> <File-Path>`:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ clang-extdef-mapping -p . foo.cpp
|
||||
9:c:@F@foo# /path/to/your/project/foo.cpp
|
||||
$ clang-extdef-mapping -p . foo.cpp > externalDefMap.txt
|
||||
|
||||
We have to modify `externalDefMap.txt` to contain the name of the `.ast` files instead of the source files:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ sed -i -e "s/.cpp/.cpp.ast/g" externalDefMap.txt
|
||||
|
||||
We still have to further modify the `externalDefMap.txt` file to contain relative paths:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ sed -i -e "s|$(pwd)/||g" externalDefMap.txt
|
||||
$ clang-extdef-mapping -p . foo.cpp.ast
|
||||
9:c:@F@foo# /path/to/your/project/foo.cpp.ast
|
||||
$ clang-extdef-mapping -p . foo.cpp.ast > externalDefMap.txt
|
||||
|
||||
Now everything is available for the CTU analysis.
|
||||
We have to feed Clang with CTU specific extra arguments:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user