git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100514 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Douglas Gregor 2010-04-06 01:25:58 +00:00
Родитель efbf487da8
Коммит f45d67364e
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -17,6 +17,7 @@
#include "clang/Frontend/ASTUnit.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Index/CallGraph.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
using namespace clang;
@ -37,10 +38,10 @@ int main(int argc, char **argv) {
llvm::OwningPtr<Diagnostic> Diags(
CompilerInstance::createDiagnostics(DiagOpts, argc, argv));
llvm::IntrusiveRefCntPtr<Diagnostic> Diags(new Diagnostic);
for (unsigned i = 0, e = InputFilenames.size(); i != e; ++i) {
const std::string &InFile = InputFilenames[i];
llvm::OwningPtr<ASTUnit> AST(ASTUnit::LoadFromPCHFile(InFile,
OwnedDiag(*Diags)));
llvm::OwningPtr<ASTUnit> AST(ASTUnit::LoadFromPCHFile(InFile, Diags));
if (!AST)
return 1;