summaryrefslogtreecommitdiff
path: root/tools/libclang/libclang.exports
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2018-04-07 20:50:35 +0000
committerFangrui Song <maskray@google.com>2018-04-07 20:50:35 +0000
commit639427d5d327e33d797db8a39eedf466d1159e97 (patch)
tree81e4a1d5a137dc45d8b5fc8c8d9f666409414704 /tools/libclang/libclang.exports
parent06e7df12ca91bef4b1680a0a4d20bac50f1719e8 (diff)
downloadclang-639427d5d327e33d797db8a39eedf466d1159e97.tar.gz
[libclang] Add clang_File_tryGetRealPathName
Summary: clang_getFileName() may return a path relative to WorkingDir. On Arch Linux, during clang_indexTranslationUnit(), clang_getFileName() on CXIdxIncludedIncludedFileInfo::file may return "/../lib64/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/string", for `#include <string>`. I presume WorkingDir is somehow changed to /usr/lib or /usr/include and clang_getFileName() returns a path relative to WorkingDir. clang_File_tryGetRealPathName() returns "/usr/include/c++/7.3.0/string" which is more useful for the indexer in this case. Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42893 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/libclang.exports')
-rw-r--r--tools/libclang/libclang.exports1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/libclang/libclang.exports b/tools/libclang/libclang.exports
index 67e4b4334b..222598dcd9 100644
--- a/tools/libclang/libclang.exports
+++ b/tools/libclang/libclang.exports
@@ -46,6 +46,7 @@ clang_Cursor_isVariadic
clang_Cursor_getModule
clang_Cursor_getStorageClass
clang_File_isEqual
+clang_File_tryGetRealPathName
clang_Module_getASTFile
clang_Module_getParent
clang_Module_getName