[libclang] Add Logger::operator<< overloads for CXCursor and FileEntry.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176680 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index 2cfaea4..9e8b2f4 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -6397,6 +6397,18 @@
return *this;
}
+Logger &cxindex::Logger::operator<<(const FileEntry *FE) {
+ *this << FE->getName();
+ return *this;
+}
+
+Logger &cxindex::Logger::operator<<(CXCursor cursor) {
+ CXString cursorName = clang_getCursorDisplayName(cursor);
+ *this << cursorName << "@" << clang_getCursorLocation(cursor);
+ clang_disposeString(cursorName);
+ return *this;
+}
+
Logger &cxindex::Logger::operator<<(CXSourceLocation Loc) {
CXFile File;
unsigned Line, Column;