diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-04-26 22:47:49 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-04-26 22:47:49 +0000 |
commit | e858e667c14ce4a9df5a4bbae770a0a3a3c8723e (patch) | |
tree | c90137a5944cf218d836524ad4b99018c5009269 /tools/libclang | |
parent | 888d34566a4de6097896863a2f6660ed1537ddb9 (diff) |
[libclang] Introduce clang_Module_getASTFile function that returns the module file where a module object came from.
rdar://13743084
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180643 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang')
-rw-r--r-- | tools/libclang/CIndex.cpp | 7 | ||||
-rw-r--r-- | tools/libclang/libclang.exports | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 0a8a068998..a43c1ab7e4 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -6055,6 +6055,13 @@ CXModule clang_Cursor_getModule(CXCursor C) { return 0; } +CXFile clang_Module_getASTFile(CXModule CXMod) { + if (!CXMod) + return 0; + Module *Mod = static_cast<Module*>(CXMod); + return const_cast<FileEntry *>(Mod->getASTFile()); +} + CXModule clang_Module_getParent(CXModule CXMod) { if (!CXMod) return 0; diff --git a/tools/libclang/libclang.exports b/tools/libclang/libclang.exports index c7508bc544..0c9912e520 100644 --- a/tools/libclang/libclang.exports +++ b/tools/libclang/libclang.exports @@ -21,6 +21,7 @@ clang_Cursor_isDynamicCall clang_Cursor_isNull clang_Cursor_isVariadic clang_Cursor_getModule +clang_Module_getASTFile clang_Module_getParent clang_Module_getName clang_Module_getFullName |