]> granicus.if.org Git - clang/commitdiff
Unbreak build
authorDouglas Gregor <dgregor@apple.com>
Tue, 6 Apr 2010 01:25:58 +0000 (01:25 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 6 Apr 2010 01:25:58 +0000 (01:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100514 91177308-0d34-0410-b5e6-96231b3b80d8

examples/wpa/clang-wpa.cpp

index 9ff796eecdb036c6d1d4b8a6d92b6f307c53189a..205d488c173e4a6b779fadf429bfd5fe7513fec4 100644 (file)
@@ -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;