From 50b73317314e889cf39c7b1d6cbf419fa7502f22 Mon Sep 17 00:00:00 2001 From: dim Date: Sat, 14 Apr 2012 14:01:31 +0000 Subject: Vendor import of clang trunk r154661: http://llvm.org/svn/llvm-project/cfe/trunk@r154661 --- lib/Frontend/ASTMerge.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lib/Frontend/ASTMerge.cpp') diff --git a/lib/Frontend/ASTMerge.cpp b/lib/Frontend/ASTMerge.cpp index cb195d1..9feb3de 100644 --- a/lib/Frontend/ASTMerge.cpp +++ b/lib/Frontend/ASTMerge.cpp @@ -26,8 +26,7 @@ bool ASTMergeAction::BeginSourceFileAction(CompilerInstance &CI, // FIXME: This is a hack. We need a better way to communicate the // AST file, compiler instance, and file name than member variables // of FrontendAction. - AdaptedAction->setCurrentFile(getCurrentFile(), getCurrentFileKind(), - takeCurrentASTUnit()); + AdaptedAction->setCurrentInput(getCurrentInput(), takeCurrentASTUnit()); AdaptedAction->setCompilerInstance(&CI); return AdaptedAction->BeginSourceFileAction(CI, Filename); } @@ -35,13 +34,13 @@ bool ASTMergeAction::BeginSourceFileAction(CompilerInstance &CI, void ASTMergeAction::ExecuteAction() { CompilerInstance &CI = getCompilerInstance(); CI.getDiagnostics().getClient()->BeginSourceFile( - CI.getASTContext().getLangOptions()); + CI.getASTContext().getLangOpts()); CI.getDiagnostics().SetArgToStringFn(&FormatASTNodeDiagnosticArgument, &CI.getASTContext()); - llvm::IntrusiveRefCntPtr + IntrusiveRefCntPtr DiagIDs(CI.getDiagnostics().getDiagnosticIDs()); for (unsigned I = 0, N = ASTFiles.size(); I != N; ++I) { - llvm::IntrusiveRefCntPtr + IntrusiveRefCntPtr Diags(new DiagnosticsEngine(DiagIDs, CI.getDiagnostics().getClient(), /*ShouldOwnClient=*/false)); ASTUnit *Unit = ASTUnit::LoadFromASTFile(ASTFiles[I], Diags, @@ -80,8 +79,8 @@ void ASTMergeAction::EndSourceFileAction() { } ASTMergeAction::ASTMergeAction(FrontendAction *AdaptedAction, - std::string *ASTFiles, unsigned NumASTFiles) - : AdaptedAction(AdaptedAction), ASTFiles(ASTFiles, ASTFiles + NumASTFiles) { + ArrayRef ASTFiles) + : AdaptedAction(AdaptedAction), ASTFiles(ASTFiles.begin(), ASTFiles.end()) { assert(AdaptedAction && "ASTMergeAction needs an action to adapt"); } -- cgit v1.1