ASTMerge.cpp (203955) | ASTMerge.cpp (206275) |
---|---|
1//===-- ASTMerge.cpp - AST Merging Frontent Action --------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9#include "clang/Frontend/ASTUnit.h" 10#include "clang/Frontend/CompilerInstance.h" 11#include "clang/Frontend/FrontendActions.h" 12#include "clang/AST/ASTContext.h" 13#include "clang/AST/ASTDiagnostic.h" 14#include "clang/AST/ASTImporter.h" | 1//===-- ASTMerge.cpp - AST Merging Frontent Action --------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9#include "clang/Frontend/ASTUnit.h" 10#include "clang/Frontend/CompilerInstance.h" 11#include "clang/Frontend/FrontendActions.h" 12#include "clang/AST/ASTContext.h" 13#include "clang/AST/ASTDiagnostic.h" 14#include "clang/AST/ASTImporter.h" |
15#include "clang/Basic/Diagnostic.h" |
|
15 16using namespace clang; 17 18ASTConsumer *ASTMergeAction::CreateASTConsumer(CompilerInstance &CI, 19 llvm::StringRef InFile) { 20 return AdaptedAction->CreateASTConsumer(CI, InFile); 21} 22 --- 8 unchanged lines hidden (view full) --- 31} 32 33void ASTMergeAction::ExecuteAction() { 34 CompilerInstance &CI = getCompilerInstance(); 35 CI.getDiagnostics().getClient()->BeginSourceFile( 36 CI.getASTContext().getLangOptions()); 37 CI.getDiagnostics().SetArgToStringFn(&FormatASTNodeDiagnosticArgument, 38 &CI.getASTContext()); | 16 17using namespace clang; 18 19ASTConsumer *ASTMergeAction::CreateASTConsumer(CompilerInstance &CI, 20 llvm::StringRef InFile) { 21 return AdaptedAction->CreateASTConsumer(CI, InFile); 22} 23 --- 8 unchanged lines hidden (view full) --- 32} 33 34void ASTMergeAction::ExecuteAction() { 35 CompilerInstance &CI = getCompilerInstance(); 36 CI.getDiagnostics().getClient()->BeginSourceFile( 37 CI.getASTContext().getLangOptions()); 38 CI.getDiagnostics().SetArgToStringFn(&FormatASTNodeDiagnosticArgument, 39 &CI.getASTContext()); |
40 llvm::IntrusiveRefCntPtr<Diagnostic> Diags(&CI.getDiagnostics()); |
|
39 for (unsigned I = 0, N = ASTFiles.size(); I != N; ++I) { | 41 for (unsigned I = 0, N = ASTFiles.size(); I != N; ++I) { |
40 ASTUnit *Unit = ASTUnit::LoadFromPCHFile(ASTFiles[I], CI.getDiagnostics(), 41 false); | 42 ASTUnit *Unit = ASTUnit::LoadFromPCHFile(ASTFiles[I], Diags, false); |
42 if (!Unit) 43 continue; 44 45 ASTImporter Importer(CI.getDiagnostics(), 46 CI.getASTContext(), 47 CI.getFileManager(), 48 Unit->getASTContext(), 49 Unit->getFileManager()); --- 54 unchanged lines hidden --- | 43 if (!Unit) 44 continue; 45 46 ASTImporter Importer(CI.getDiagnostics(), 47 CI.getASTContext(), 48 CI.getFileManager(), 49 Unit->getASTContext(), 50 Unit->getFileManager()); --- 54 unchanged lines hidden --- |