diff options
Diffstat (limited to 'tools/CIndex/CIndex.cpp')
-rw-r--r-- | tools/CIndex/CIndex.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp index 2b56bfb7d1..01130e2277 100644 --- a/tools/CIndex/CIndex.cpp +++ b/tools/CIndex/CIndex.cpp @@ -996,7 +996,8 @@ CXTranslationUnit clang_createTranslationUnit(CXIndex CIdx, CIndexer *CXXIdx = static_cast<CIndexer *>(CIdx); - return ASTUnit::LoadFromPCHFile(ast_filename, DefaultDiag(), + llvm::IntrusiveRefCntPtr<Diagnostic> Diags; + return ASTUnit::LoadFromPCHFile(ast_filename, Diags, CXXIdx->getOnlyLocalDecls(), 0, 0, true); } @@ -1015,8 +1016,8 @@ clang_createTranslationUnitFromSourceFile(CXIndex CIdx, // Configure the diagnostics. DiagnosticOptions DiagOpts; - llvm::MaybeOwningPtr<Diagnostic> Diags; - Diags.reset(CompilerInstance::createDiagnostics(DiagOpts, 0, 0), true); + llvm::IntrusiveRefCntPtr<Diagnostic> Diags; + Diags = CompilerInstance::createDiagnostics(DiagOpts, 0, 0); llvm::SmallVector<ASTUnit::RemappedFile, 4> RemappedFiles; for (unsigned I = 0; I != num_unsaved_files; ++I) { |