Add clang_getNullCursor() and clang_equalCursors() (the latter for comparing cursors).
llvm-svn: 89131
diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp
index 2e0eafe..ebdba29 100644
--- a/clang/tools/CIndex/CIndex.cpp
+++ b/clang/tools/CIndex/CIndex.cpp
@@ -875,6 +875,18 @@
return C;
}
+CXCursor clang_getNullCursor(void) {
+ CXCursor C;
+ C.kind = CXCursor_InvalidFile;
+ C.decl = NULL;
+ C.stmt = NULL;
+ return C;
+}
+
+unsigned clang_equalCursors(CXCursor X, CXCursor Y) {
+ return X.kind == Y.kind && X.decl == Y.decl && X.stmt == Y.stmt;
+}
+
CXCursor clang_getCursorFromDecl(CXDecl AnonDecl)
{
assert(AnonDecl && "Passed null CXDecl");