drop more llvm:: prefixes on OwningPtr<>

More cleanup after r149798.

llvm-svn: 150379
This commit is contained in:
Dylan Noblesmith 2012-02-13 12:32:21 +00:00
parent 01b2c9e82f
commit 1cd1069b68
12 changed files with 29 additions and 29 deletions

View File

@ -8,7 +8,7 @@ using namespace ento;
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;

View File

@ -46,7 +46,7 @@ static int Execute(llvm::Module *Mod, char * const *envp) {
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 @@ int main(int argc, const char **argv, char * const *envp) {
// (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 @@ int main(int argc, const char **argv, char * const *envp) {
// 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 @@ int main(int argc, const char **argv, char * const *envp) {
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;

View File

@ -94,7 +94,7 @@ int main(int argc, char **argv) {
= 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 @@ int main(int argc, char **argv) {
}
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 @@ int main(int argc, char **argv) {
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()));

View File

@ -177,7 +177,7 @@ static bool performTransformations(StringRef resourcesPath,
origCI.getMigratorOpts().NoFinalizeRemoval);
assert(!transforms.empty());
llvm::OwningPtr<PrintTransforms> transformPrinter;
OwningPtr<PrintTransforms> transformPrinter;
if (OutputTransformations)
transformPrinter.reset(new PrintTransforms(llvm::outs()));

View File

@ -117,7 +117,7 @@ static int cc1_test(DiagnosticsEngine &Diags,
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.

View File

@ -411,7 +411,7 @@ int cc1as_main(const char **ArgBegin, const char **ArgEnd,
// 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;
}

View File

@ -186,7 +186,7 @@ static void ExpandArgsFromBuf(const char *Arg,
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 @@ int main(int argc_, const char **argv_) {
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())

View File

@ -56,7 +56,7 @@ CXRemapping clang_getRemappings(const char *migrate_dir_path) {
}
TextDiagnosticBuffer diagBuffer;
llvm::OwningPtr<Remap> remap(new Remap());
OwningPtr<Remap> remap(new Remap());
bool err = arcmt::getFileRemappings(remap->Vec, migrate_dir_path,&diagBuffer);

View File

@ -2457,7 +2457,7 @@ static void clang_parseTranslationUnit_Impl(void *UserData) {
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 @@ static void clang_parseTranslationUnit_Impl(void *UserData) {
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 @@ static void clang_parseTranslationUnit_Impl(void *UserData) {
}
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 @@ static void clang_reparseTranslationUnit_Impl(void *UserData) {
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 @@ CXTUResourceUsage clang_getCXTUResourceUsage(CXTranslationUnit TU) {
}
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?

View File

@ -30,7 +30,7 @@ using namespace clang::cxstring;
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;

View File

@ -257,7 +257,7 @@ CXDiagnosticSet DiagLoader::load(const char *file) {
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 @@ CXDiagnosticSet DiagLoader::load(const char *file) {
return 0;
}
llvm::OwningPtr<CXLoadedDiagnosticSetImpl>
OwningPtr<CXLoadedDiagnosticSetImpl>
Diags(new CXLoadedDiagnosticSetImpl());
while (true) {
@ -543,7 +543,7 @@ LoadResult DiagLoader::readDiagnosticBlock(llvm::BitstreamCursor &Stream,
return Failure;
}
llvm::OwningPtr<CXLoadedDiagnostic> D(new CXLoadedDiagnostic());
OwningPtr<CXLoadedDiagnostic> D(new CXLoadedDiagnostic());
RecordData Record;
while (true) {

View File

@ -280,7 +280,7 @@ static void clang_indexSourceFile_Impl(void *UserData) {
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 @@ static void clang_indexSourceFile_Impl(void *UserData) {
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 @@ static void clang_indexSourceFile_Impl(void *UserData) {
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 @@ static void clang_indexTranslationUnit_Impl(void *UserData) {
? 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.