[libclang] When logging a CXTranslationUnit that came from an AST file, print out the filename.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176511 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index 36224a8..2cfaea4 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -6387,6 +6387,8 @@
if (TU) {
if (ASTUnit *Unit = cxtu::getASTUnit(TU)) {
LogOS << '<' << Unit->getMainFileName() << '>';
+ if (Unit->isMainFileAST())
+ LogOS << " (" << Unit->getASTFileName() << ')';
return *this;
}
}