]> granicus.if.org Git - clang/commitdiff
[libclang] Add logging for clang_createTranslationUnit.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 24 May 2013 22:24:07 +0000 (22:24 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 24 May 2013 22:24:07 +0000 (22:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182682 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/CIndex.cpp

index bd20800993b8d770eadf262806f5a8ea311f5018..dbef6209ec8ed843ebd39a1a5cfb87684886ac82 100644 (file)
@@ -2544,9 +2544,13 @@ void clang_toggleCrashRecovery(unsigned isEnabled) {
   
 CXTranslationUnit clang_createTranslationUnit(CXIndex CIdx,
                                               const char *ast_filename) {
-  if (!CIdx)
+  if (!CIdx || !ast_filename)
     return 0;
 
+  LOG_FUNC_SECTION {
+    *Log << ast_filename;
+  }
+
   CIndexer *CXXIdx = static_cast<CIndexer *>(CIdx);
   FileSystemOptions FileSystemOpts;