For now, add back clang_getDeclSource().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93003 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index 28a86e7..19e82fc 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -718,6 +718,13 @@
return extent;
}
+const char *clang_getDeclSource(CXDecl AnonDecl) {
+ assert(AnonDecl && "Passed null CXDecl");
+ FileEntry *FEnt = static_cast<FileEntry *>(clang_getDeclSourceFile(AnonDecl));
+ assert(FEnt && "Cannot find FileEntry for Decl");
+ return clang_getFileName(FEnt);
+}
+
static const FileEntry *getFileEntryFromSourceLocation(SourceManager &SMgr,
SourceLocation SLoc) {
FileID FID;
diff --git a/tools/CIndex/CIndex.exports b/tools/CIndex/CIndex.exports
index 4feab15..3326087 100644
--- a/tools/CIndex/CIndex.exports
+++ b/tools/CIndex/CIndex.exports
@@ -25,6 +25,7 @@
_clang_getDeclExtent
_clang_getDeclLine
_clang_getDeclExtent
+_clang_getDeclSource
_clang_getDeclSourceFile
_clang_getDeclSpelling
_clang_getDeclarationName