[cfe-commits] r150379 - in /cfe/trunk: examples/analyzer-plugin/MainCallChecker.cpp examples/clang-interpreter/main.cpp examples/wpa/clang-wpa.cpp tools/arcmt-test/arcmt-test.cpp tools/driver/cc1_main.cpp tools/driver/cc1as_main.cpp tools/driver/driver.cpp tools/libclang/ARCMigrate.cpp tools/libclang/CIndex.cpp tools/libclang/CIndexUSRs.cpp tools/libclang/CXLoadedDiagnostic.cpp tools/libclang/Indexing.cpp

Dylan Noblesmith nobled at dreamwidth.org
Mon Feb 13 04:32:21 PST 2012


Author: nobled
Date: Mon Feb 13 06:32:21 2012
New Revision: 150379

URL: http://llvm.org/viewvc/llvm-project?rev=150379&view=rev
Log:
drop more llvm:: prefixes on OwningPtr<>

More cleanup after r149798.

Modified:
    cfe/trunk/examples/analyzer-plugin/MainCallChecker.cpp
    cfe/trunk/examples/clang-interpreter/main.cpp
    cfe/trunk/examples/wpa/clang-wpa.cpp
    cfe/trunk/tools/arcmt-test/arcmt-test.cpp
    cfe/trunk/tools/driver/cc1_main.cpp
    cfe/trunk/tools/driver/cc1as_main.cpp
    cfe/trunk/tools/driver/driver.cpp
    cfe/trunk/tools/libclang/ARCMigrate.cpp
    cfe/trunk/tools/libclang/CIndex.cpp
    cfe/trunk/tools/libclang/CIndexUSRs.cpp
    cfe/trunk/tools/libclang/CXLoadedDiagnostic.cpp
    cfe/trunk/tools/libclang/Indexing.cpp

Modified: cfe/trunk/examples/analyzer-plugin/MainCallChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/analyzer-plugin/MainCallChecker.cpp?rev=150379&r1=150378&r2=150379&view=diff
==============================================================================
--- cfe/trunk/examples/analyzer-plugin/MainCallChecker.cpp (original)
+++ cfe/trunk/examples/analyzer-plugin/MainCallChecker.cpp Mon Feb 13 06:32:21 2012
@@ -8,7 +8,7 @@
 
 namespace {
 class MainCallChecker : public Checker < check::PreStmt<CallExpr> > {
-  mutable llvm::OwningPtr<BugType> BT;
+  mutable OwningPtr<BugType> BT;
 
 public:
   void checkPreStmt(const CallExpr *CE, CheckerContext &C) const;

Modified: cfe/trunk/examples/clang-interpreter/main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/main.cpp?rev=150379&r1=150378&r2=150379&view=diff
==============================================================================
--- cfe/trunk/examples/clang-interpreter/main.cpp (original)
+++ cfe/trunk/examples/clang-interpreter/main.cpp Mon Feb 13 06:32:21 2012
@@ -46,7 +46,7 @@
   llvm::InitializeNativeTarget();
 
   std::string Error;
-  llvm::OwningPtr<llvm::ExecutionEngine> EE(
+  OwningPtr<llvm::ExecutionEngine> EE(
     llvm::ExecutionEngine::createJIT(Mod, &Error));
   if (!EE) {
     llvm::errs() << "unable to make execution engine: " << Error << "\n";
@@ -83,7 +83,7 @@
   // (basically, exactly one input, and the operation mode is hard wired).
   llvm::SmallVector<const char *, 16> Args(argv, argv + argc);
   Args.push_back("-fsyntax-only");
-  llvm::OwningPtr<Compilation> C(TheDriver.BuildCompilation(Args));
+  OwningPtr<Compilation> C(TheDriver.BuildCompilation(Args));
   if (!C)
     return 0;
 
@@ -108,7 +108,7 @@
 
   // Initialize a compiler invocation object from the clang (-cc1) arguments.
   const driver::ArgStringList &CCArgs = Cmd->getArguments();
-  llvm::OwningPtr<CompilerInvocation> CI(new CompilerInvocation);
+  OwningPtr<CompilerInvocation> CI(new CompilerInvocation);
   CompilerInvocation::CreateFromArgs(*CI,
                                      const_cast<const char **>(CCArgs.data()),
                                      const_cast<const char **>(CCArgs.data()) +
@@ -140,7 +140,7 @@
       CompilerInvocation::GetResourcesPath(argv[0], MainAddr);
 
   // Create and execute the frontend to generate an LLVM bitcode module.
-  llvm::OwningPtr<CodeGenAction> Act(new EmitLLVMOnlyAction());
+  OwningPtr<CodeGenAction> Act(new EmitLLVMOnlyAction());
   if (!Clang.ExecuteAction(*Act))
     return 1;
 

Modified: cfe/trunk/examples/wpa/clang-wpa.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/wpa/clang-wpa.cpp?rev=150379&r1=150378&r2=150379&view=diff
==============================================================================
--- cfe/trunk/examples/wpa/clang-wpa.cpp (original)
+++ cfe/trunk/examples/wpa/clang-wpa.cpp Mon Feb 13 06:32:21 2012
@@ -94,7 +94,7 @@
     = CompilerInstance::createDiagnostics(DiagOpts, argc, argv);
   for (unsigned i = 0, e = InputFilenames.size(); i != e; ++i) {
     const std::string &InFile = InputFilenames[i];
-    llvm::OwningPtr<ASTUnit> AST(ASTUnit::LoadFromASTFile(InFile, Diags,
+    OwningPtr<ASTUnit> AST(ASTUnit::LoadFromASTFile(InFile, Diags,
                                                           FileSystemOptions(),
                                                           false, 0, 0, true));
     if (!AST)
@@ -104,7 +104,7 @@
   }
 
   if (ViewCallGraph) {
-    llvm::OwningPtr<CallGraph> CG;
+    OwningPtr<CallGraph> CG;
     CG.reset(new CallGraph(Prog));
 
     for (unsigned i = 0, e = ASTUnits.size(); i != e; ++i)
@@ -154,7 +154,7 @@
   if (PP.getLangOptions().ObjC1)
     Opts.CheckersControlList.push_back(std::make_pair("cocoa", true));
 
-  llvm::OwningPtr<ento::CheckerManager> checkerMgr;
+  OwningPtr<ento::CheckerManager> checkerMgr;
   checkerMgr.reset(ento::registerCheckers(Opts, PP.getLangOptions(),
                                           PP.getDiagnostics()));
 

Modified: cfe/trunk/tools/arcmt-test/arcmt-test.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/arcmt-test/arcmt-test.cpp?rev=150379&r1=150378&r2=150379&view=diff
==============================================================================
--- cfe/trunk/tools/arcmt-test/arcmt-test.cpp (original)
+++ cfe/trunk/tools/arcmt-test/arcmt-test.cpp Mon Feb 13 06:32:21 2012
@@ -177,7 +177,7 @@
                                  origCI.getMigratorOpts().NoFinalizeRemoval);
   assert(!transforms.empty());
 
-  llvm::OwningPtr<PrintTransforms> transformPrinter;
+  OwningPtr<PrintTransforms> transformPrinter;
   if (OutputTransformations)
     transformPrinter.reset(new PrintTransforms(llvm::outs()));
 

Modified: cfe/trunk/tools/driver/cc1_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1_main.cpp?rev=150379&r1=150378&r2=150379&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1_main.cpp Mon Feb 13 06:32:21 2012
@@ -117,7 +117,7 @@
 
 int cc1_main(const char **ArgBegin, const char **ArgEnd,
              const char *Argv0, void *MainAddr) {
-  llvm::OwningPtr<CompilerInstance> Clang(new CompilerInstance());
+  OwningPtr<CompilerInstance> Clang(new CompilerInstance());
   llvm::IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
 
   // Run clang -cc1 test.

Modified: cfe/trunk/tools/driver/cc1as_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1as_main.cpp?rev=150379&r1=150378&r2=150379&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1as_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1as_main.cpp Mon Feb 13 06:32:21 2012
@@ -411,7 +411,7 @@
 
   // Honor -help.
   if (Asm.ShowHelp) {
-    llvm::OwningPtr<driver::OptTable> Opts(driver::createCC1AsOptTable());
+    OwningPtr<driver::OptTable> Opts(driver::createCC1AsOptTable());
     Opts->PrintHelp(llvm::outs(), "clang -cc1as", "Clang Integrated Assembler");
     return 0;
   }

Modified: cfe/trunk/tools/driver/driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/driver.cpp?rev=150379&r1=150378&r2=150379&view=diff
==============================================================================
--- cfe/trunk/tools/driver/driver.cpp (original)
+++ cfe/trunk/tools/driver/driver.cpp Mon Feb 13 06:32:21 2012
@@ -186,7 +186,7 @@
                               SmallVectorImpl<const char*> &ArgVector,
                               std::set<std::string> &SavedStrings) {
   const char *FName = Arg + 1;
-  llvm::OwningPtr<llvm::MemoryBuffer> MemBuf;
+  OwningPtr<llvm::MemoryBuffer> MemBuf;
   if (llvm::MemoryBuffer::getFile(FName, MemBuf)) {
     ArgVector.push_back(SaveStringInSet(SavedStrings, Arg));
     return;
@@ -448,7 +448,7 @@
     argv.insert(&argv[1], ExtraArgs.begin(), ExtraArgs.end());
   }
 
-  llvm::OwningPtr<Compilation> C(TheDriver.BuildCompilation(argv));
+  OwningPtr<Compilation> C(TheDriver.BuildCompilation(argv));
   int Res = 0;
   const Command *FailingCommand = 0;
   if (C.get())

Modified: cfe/trunk/tools/libclang/ARCMigrate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/ARCMigrate.cpp?rev=150379&r1=150378&r2=150379&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/ARCMigrate.cpp (original)
+++ cfe/trunk/tools/libclang/ARCMigrate.cpp Mon Feb 13 06:32:21 2012
@@ -56,7 +56,7 @@
   }
 
   TextDiagnosticBuffer diagBuffer;
-  llvm::OwningPtr<Remap> remap(new Remap());
+  OwningPtr<Remap> remap(new Remap());
 
   bool err = arcmt::getFileRemappings(remap->Vec, migrate_dir_path,&diagBuffer);
 

Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=150379&r1=150378&r2=150379&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Mon Feb 13 06:32:21 2012
@@ -2457,7 +2457,7 @@
     llvm::CrashRecoveryContextReleaseRefCleanup<DiagnosticsEngine> >
     DiagCleanup(Diags.getPtr());
 
-  llvm::OwningPtr<std::vector<ASTUnit::RemappedFile> >
+  OwningPtr<std::vector<ASTUnit::RemappedFile> >
     RemappedFiles(new std::vector<ASTUnit::RemappedFile>());
 
   // Recover resources if we crash before exiting this function.
@@ -2472,7 +2472,7 @@
                                             Buffer));
   }
 
-  llvm::OwningPtr<std::vector<const char *> > 
+  OwningPtr<std::vector<const char *> >
     Args(new std::vector<const char*>());
 
   // Recover resources if we crash before exiting this method.
@@ -2516,7 +2516,7 @@
   }
   
   unsigned NumErrors = Diags->getClient()->getNumErrors();
-  llvm::OwningPtr<ASTUnit> Unit(
+  OwningPtr<ASTUnit> Unit(
     ASTUnit::LoadFromCommandLine(Args->size() ? &(*Args)[0] : 0 
                                  /* vector::data() not portable */,
                                  Args->size() ? (&(*Args)[0] + Args->size()) :0,
@@ -2658,7 +2658,7 @@
   ASTUnit *CXXUnit = static_cast<ASTUnit *>(TU->TUData);
   ASTUnit::ConcurrencyCheck Check(*CXXUnit);
   
-  llvm::OwningPtr<std::vector<ASTUnit::RemappedFile> >
+  OwningPtr<std::vector<ASTUnit::RemappedFile> >
     RemappedFiles(new std::vector<ASTUnit::RemappedFile>());
   
   // Recover resources if we crash before exiting this function.
@@ -5448,7 +5448,7 @@
   }
   
   ASTUnit *astUnit = static_cast<ASTUnit*>(TU->TUData);
-  llvm::OwningPtr<MemUsageEntries> entries(new MemUsageEntries());
+  OwningPtr<MemUsageEntries> entries(new MemUsageEntries());
   ASTContext &astContext = astUnit->getASTContext();
   
   // How much memory is used by AST nodes and types?

Modified: cfe/trunk/tools/libclang/CIndexUSRs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndexUSRs.cpp?rev=150379&r1=150378&r2=150379&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndexUSRs.cpp (original)
+++ cfe/trunk/tools/libclang/CIndexUSRs.cpp Mon Feb 13 06:32:21 2012
@@ -30,7 +30,7 @@
 
 namespace {
 class USRGenerator : public DeclVisitor<USRGenerator> {
-  llvm::OwningPtr<llvm::SmallString<128> > OwnedBuf;
+  OwningPtr<llvm::SmallString<128> > OwnedBuf;
   SmallVectorImpl<char> &Buf;
   llvm::raw_svector_ostream Out;
   bool IgnoreResults;

Modified: cfe/trunk/tools/libclang/CXLoadedDiagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CXLoadedDiagnostic.cpp?rev=150379&r1=150378&r2=150379&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CXLoadedDiagnostic.cpp (original)
+++ cfe/trunk/tools/libclang/CXLoadedDiagnostic.cpp Mon Feb 13 06:32:21 2012
@@ -257,7 +257,7 @@
   FileSystemOptions FO;
   FileManager FileMgr(FO);
 
-  llvm::OwningPtr<llvm::MemoryBuffer> Buffer;
+  OwningPtr<llvm::MemoryBuffer> Buffer;
   Buffer.reset(FileMgr.getBufferForFile(file));
 
   if (!Buffer) {
@@ -282,7 +282,7 @@
     return 0;
   }
 
-  llvm::OwningPtr<CXLoadedDiagnosticSetImpl>
+  OwningPtr<CXLoadedDiagnosticSetImpl>
     Diags(new CXLoadedDiagnosticSetImpl());
 
   while (true) {
@@ -543,7 +543,7 @@
     return Failure;
   }
   
-  llvm::OwningPtr<CXLoadedDiagnostic> D(new CXLoadedDiagnostic());
+  OwningPtr<CXLoadedDiagnostic> D(new CXLoadedDiagnostic());
   RecordData Record;
   
   while (true) {

Modified: cfe/trunk/tools/libclang/Indexing.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/Indexing.cpp?rev=150379&r1=150378&r2=150379&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/Indexing.cpp (original)
+++ cfe/trunk/tools/libclang/Indexing.cpp Mon Feb 13 06:32:21 2012
@@ -280,7 +280,7 @@
     llvm::CrashRecoveryContextReleaseRefCleanup<DiagnosticsEngine> >
     DiagCleanup(Diags.getPtr());
   
-  llvm::OwningPtr<std::vector<const char *> > 
+  OwningPtr<std::vector<const char *> >
     Args(new std::vector<const char*>());
 
   // Recover resources if we crash before exiting this method.
@@ -312,7 +312,7 @@
   if (CInvok->getFrontendOpts().Inputs.empty())
     return;
 
-  llvm::OwningPtr<MemBufferOwner> BufOwner(new MemBufferOwner());
+  OwningPtr<MemBufferOwner> BufOwner(new MemBufferOwner());
 
   // Recover resources if we crash before exiting this method.
   llvm::CrashRecoveryContextCleanupRegistrar<MemBufferOwner>
@@ -337,13 +337,13 @@
 
   ASTUnit *Unit = ASTUnit::create(CInvok.getPtr(), Diags,
                                   /*CaptureDiagnostics=*/true);
-  llvm::OwningPtr<CXTUOwner> CXTU(new CXTUOwner(MakeCXTranslationUnit(Unit)));
+  OwningPtr<CXTUOwner> CXTU(new CXTUOwner(MakeCXTranslationUnit(Unit)));
 
   // Recover resources if we crash before exiting this method.
   llvm::CrashRecoveryContextCleanupRegistrar<CXTUOwner>
     CXTUCleanup(CXTU.get());
 
-  llvm::OwningPtr<IndexingFrontendAction> IndexAction;
+  OwningPtr<IndexingFrontendAction> IndexAction;
   IndexAction.reset(new IndexingFrontendAction(client_data, CB,
                                                index_options, CXTU->getTU()));
 
@@ -496,14 +496,14 @@
                                   ? index_callbacks_size : sizeof(CB);
   memcpy(&CB, client_index_callbacks, ClientCBSize);
 
-  llvm::OwningPtr<IndexingContext> IndexCtx;
+  OwningPtr<IndexingContext> IndexCtx;
   IndexCtx.reset(new IndexingContext(client_data, CB, index_options, TU));
 
   // Recover resources if we crash before exiting this method.
   llvm::CrashRecoveryContextCleanupRegistrar<IndexingContext>
     IndexCtxCleanup(IndexCtx.get());
 
-  llvm::OwningPtr<IndexingConsumer> IndexConsumer;
+  OwningPtr<IndexingConsumer> IndexConsumer;
   IndexConsumer.reset(new IndexingConsumer(*IndexCtx));
 
   // Recover resources if we crash before exiting this method.





More information about the cfe-commits mailing list