[cfe-commits] r100514 - /cfe/trunk/examples/wpa/clang-wpa.cpp

Douglas Gregor dgregor at apple.com
Mon Apr 5 18:25:58 PDT 2010


Author: dgregor
Date: Mon Apr  5 20:25:58 2010
New Revision: 100514

URL: http://llvm.org/viewvc/llvm-project?rev=100514&view=rev
Log:
Unbreak build

Modified:
    cfe/trunk/examples/wpa/clang-wpa.cpp

Modified: cfe/trunk/examples/wpa/clang-wpa.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/wpa/clang-wpa.cpp?rev=100514&r1=100513&r2=100514&view=diff
==============================================================================
--- cfe/trunk/examples/wpa/clang-wpa.cpp (original)
+++ cfe/trunk/examples/wpa/clang-wpa.cpp Mon Apr  5 20:25:58 2010
@@ -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 @@
   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;
 





More information about the cfe-commits mailing list