diff options
author | Dylan Noblesmith <nobled@dreamwidth.org> | 2012-02-20 14:00:23 +0000 |
---|---|---|
committer | Dylan Noblesmith <nobled@dreamwidth.org> | 2012-02-20 14:00:23 +0000 |
commit | c93dc7889644293e318e19d82830ea2acc45b678 (patch) | |
tree | de423914cb6cfda9e4cee58cf3d6a70bb7e7c07f /lib/Frontend | |
parent | 345032a7211a6f983d59c30c0b3fa2b96819532a (diff) |
Basic: import IntrusiveRefCntPtr<> into clang namespace
The class name is long enough without the llvm:: added.
Also bring in RefCountedBase and RefCountedBaseVPTR.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r-- | lib/Frontend/ASTMerge.cpp | 4 | ||||
-rw-r--r-- | lib/Frontend/ASTUnit.cpp | 24 | ||||
-rw-r--r-- | lib/Frontend/ChainedIncludesSource.cpp | 4 | ||||
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 8 | ||||
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/CreateInvocationFromCommandLine.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/FrontendAction.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/Warnings.cpp | 2 |
8 files changed, 24 insertions, 24 deletions
diff --git a/lib/Frontend/ASTMerge.cpp b/lib/Frontend/ASTMerge.cpp index d33e0ea2cd..f3e6ea85be 100644 --- a/lib/Frontend/ASTMerge.cpp +++ b/lib/Frontend/ASTMerge.cpp @@ -37,10 +37,10 @@ void ASTMergeAction::ExecuteAction() { CI.getASTContext().getLangOptions()); CI.getDiagnostics().SetArgToStringFn(&FormatASTNodeDiagnosticArgument, &CI.getASTContext()); - llvm::IntrusiveRefCntPtr<DiagnosticIDs> + IntrusiveRefCntPtr<DiagnosticIDs> DiagIDs(CI.getDiagnostics().getDiagnosticIDs()); for (unsigned I = 0, N = ASTFiles.size(); I != N; ++I) { - llvm::IntrusiveRefCntPtr<DiagnosticsEngine> + IntrusiveRefCntPtr<DiagnosticsEngine> Diags(new DiagnosticsEngine(DiagIDs, CI.getDiagnostics().getClient(), /*ShouldOwnClient=*/false)); ASTUnit *Unit = ASTUnit::LoadFromASTFile(ASTFiles[I], Diags, diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index 1f2508730f..82255c722e 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -493,7 +493,7 @@ class ASTInfoCollector : public ASTReaderListener { ASTContext &Context; LangOptions &LangOpt; HeaderSearch &HSI; - llvm::IntrusiveRefCntPtr<TargetInfo> &Target; + IntrusiveRefCntPtr<TargetInfo> &Target; std::string &Predefines; unsigned &Counter; @@ -503,7 +503,7 @@ class ASTInfoCollector : public ASTReaderListener { public: ASTInfoCollector(Preprocessor &PP, ASTContext &Context, LangOptions &LangOpt, HeaderSearch &HSI, - llvm::IntrusiveRefCntPtr<TargetInfo> &Target, + IntrusiveRefCntPtr<TargetInfo> &Target, std::string &Predefines, unsigned &Counter) : PP(PP), Context(Context), LangOpt(LangOpt), HSI(HSI), Target(Target), @@ -630,7 +630,7 @@ llvm::MemoryBuffer *ASTUnit::getBufferForFile(StringRef Filename, } /// \brief Configure the diagnostics object for use with ASTUnit. -void ASTUnit::ConfigureDiags(llvm::IntrusiveRefCntPtr<DiagnosticsEngine> &Diags, +void ASTUnit::ConfigureDiags(IntrusiveRefCntPtr<DiagnosticsEngine> &Diags, const char **ArgBegin, const char **ArgEnd, ASTUnit &AST, bool CaptureDiagnostics) { if (!Diags.getPtr()) { @@ -648,7 +648,7 @@ void ASTUnit::ConfigureDiags(llvm::IntrusiveRefCntPtr<DiagnosticsEngine> &Diags, } ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename, - llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags, + IntrusiveRefCntPtr<DiagnosticsEngine> Diags, const FileSystemOptions &FileSystemOpts, bool OnlyLocalDecls, RemappedFile *RemappedFiles, @@ -1031,7 +1031,7 @@ bool ASTUnit::Parse(llvm::MemoryBuffer *OverrideMainBuffer) { llvm::CrashRecoveryContextCleanupRegistrar<CompilerInstance> CICleanup(Clang.get()); - llvm::IntrusiveRefCntPtr<CompilerInvocation> + IntrusiveRefCntPtr<CompilerInvocation> CCInvocation(new CompilerInvocation(*Invocation)); Clang->setInvocation(CCInvocation.getPtr()); @@ -1308,7 +1308,7 @@ llvm::MemoryBuffer *ASTUnit::getMainBufferWithPrecompiledPreamble( bool AllowRebuild, unsigned MaxLines) { - llvm::IntrusiveRefCntPtr<CompilerInvocation> + IntrusiveRefCntPtr<CompilerInvocation> PreambleInvocation(new CompilerInvocation(PreambleInvocationIn)); FrontendOptions &FrontendOpts = PreambleInvocation->getFrontendOpts(); PreprocessorOptions &PreprocessorOpts @@ -1646,7 +1646,7 @@ StringRef ASTUnit::getMainFileName() const { } ASTUnit *ASTUnit::create(CompilerInvocation *CI, - llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags, + IntrusiveRefCntPtr<DiagnosticsEngine> Diags, bool CaptureDiagnostics) { OwningPtr<ASTUnit> AST; AST.reset(new ASTUnit(false)); @@ -1661,7 +1661,7 @@ ASTUnit *ASTUnit::create(CompilerInvocation *CI, } ASTUnit *ASTUnit::LoadFromCompilerInvocationAction(CompilerInvocation *CI, - llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags, + IntrusiveRefCntPtr<DiagnosticsEngine> Diags, ASTFrontendAction *Action, ASTUnit *Unit, bool Persistent, @@ -1827,7 +1827,7 @@ bool ASTUnit::LoadFromCompilerInvocation(bool PrecompilePreamble) { } ASTUnit *ASTUnit::LoadFromCompilerInvocation(CompilerInvocation *CI, - llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags, + IntrusiveRefCntPtr<DiagnosticsEngine> Diags, bool OnlyLocalDecls, bool CaptureDiagnostics, bool PrecompilePreamble, @@ -1858,7 +1858,7 @@ ASTUnit *ASTUnit::LoadFromCompilerInvocation(CompilerInvocation *CI, ASTUnit *ASTUnit::LoadFromCommandLine(const char **ArgBegin, const char **ArgEnd, - llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags, + IntrusiveRefCntPtr<DiagnosticsEngine> Diags, StringRef ResourceFilesPath, bool OnlyLocalDecls, bool CaptureDiagnostics, @@ -1879,7 +1879,7 @@ ASTUnit *ASTUnit::LoadFromCommandLine(const char **ArgBegin, SmallVector<StoredDiagnostic, 4> StoredDiagnostics; - llvm::IntrusiveRefCntPtr<CompilerInvocation> CI; + IntrusiveRefCntPtr<CompilerInvocation> CI; { @@ -2252,7 +2252,7 @@ void ASTUnit::CodeComplete(StringRef File, unsigned Line, unsigned Column, CompletionTimer.setOutput("Code completion @ " + File + ":" + Twine(Line) + ":" + Twine(Column)); - llvm::IntrusiveRefCntPtr<CompilerInvocation> + IntrusiveRefCntPtr<CompilerInvocation> CCInvocation(new CompilerInvocation(*Invocation)); FrontendOptions &FrontendOpts = CCInvocation->getFrontendOpts(); diff --git a/lib/Frontend/ChainedIncludesSource.cpp b/lib/Frontend/ChainedIncludesSource.cpp index 4ecc052198..c46743d13f 100644 --- a/lib/Frontend/ChainedIncludesSource.cpp +++ b/lib/Frontend/ChainedIncludesSource.cpp @@ -87,8 +87,8 @@ ChainedIncludesSource *ChainedIncludesSource::create(CompilerInstance &CI) { TextDiagnosticPrinter *DiagClient = new TextDiagnosticPrinter(llvm::errs(), DiagnosticOptions()); - llvm::IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs()); - llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags( + IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs()); + IntrusiveRefCntPtr<DiagnosticsEngine> Diags( new DiagnosticsEngine(DiagID, DiagClient)); OwningPtr<CompilerInstance> Clang(new CompilerInstance()); diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index 1a6876c4ad..8d84277f01 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -175,15 +175,15 @@ void CompilerInstance::createDiagnostics(int Argc, const char* const *Argv, &getCodeGenOpts()); } -llvm::IntrusiveRefCntPtr<DiagnosticsEngine> +IntrusiveRefCntPtr<DiagnosticsEngine> CompilerInstance::createDiagnostics(const DiagnosticOptions &Opts, int Argc, const char* const *Argv, DiagnosticConsumer *Client, bool ShouldOwnClient, bool ShouldCloneClient, const CodeGenOptions *CodeGenOpts) { - llvm::IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs()); - llvm::IntrusiveRefCntPtr<DiagnosticsEngine> + IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs()); + IntrusiveRefCntPtr<DiagnosticsEngine> Diags(new DiagnosticsEngine(DiagID)); // Create the diagnostic client for reporting errors or for @@ -734,7 +734,7 @@ static void compileModule(CompilerInstance &ImportingInstance, = ImportingInstance.getPreprocessor().getHeaderSearchInfo().getModuleMap(); // Construct a compiler invocation for creating this module. - llvm::IntrusiveRefCntPtr<CompilerInvocation> Invocation + IntrusiveRefCntPtr<CompilerInvocation> Invocation (new CompilerInvocation(ImportingInstance.getInvocation())); PreprocessorOptions &PPOpts = Invocation->getPreprocessorOpts(); diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index d4188969d3..862a6547f8 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -38,7 +38,7 @@ CompilerInvocationBase::CompilerInvocationBase() : LangOpts(new LangOptions()) {} CompilerInvocationBase::CompilerInvocationBase(const CompilerInvocationBase &X) - : llvm::RefCountedBase<CompilerInvocation>(), + : RefCountedBase<CompilerInvocation>(), LangOpts(new LangOptions(*X.getLangOpts())) {} //===----------------------------------------------------------------------===// diff --git a/lib/Frontend/CreateInvocationFromCommandLine.cpp b/lib/Frontend/CreateInvocationFromCommandLine.cpp index 653da75f25..b477adebad 100644 --- a/lib/Frontend/CreateInvocationFromCommandLine.cpp +++ b/lib/Frontend/CreateInvocationFromCommandLine.cpp @@ -30,7 +30,7 @@ using namespace clang; /// argument vector. CompilerInvocation * clang::createInvocationFromCommandLine(ArrayRef<const char *> ArgList, - llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags) { + IntrusiveRefCntPtr<DiagnosticsEngine> Diags) { if (!Diags.getPtr()) { // No diagnostics engine was provided, so create our own diagnostics object // with the default options. diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp index 307b083e4b..4bc6dada70 100644 --- a/lib/Frontend/FrontendAction.cpp +++ b/lib/Frontend/FrontendAction.cpp @@ -173,7 +173,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, assert(hasASTFileSupport() && "This action does not have AST file support!"); - llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags(&CI.getDiagnostics()); + IntrusiveRefCntPtr<DiagnosticsEngine> Diags(&CI.getDiagnostics()); std::string Error; ASTUnit *AST = ASTUnit::LoadFromASTFile(Input.File, Diags, CI.getFileSystemOpts()); diff --git a/lib/Frontend/Warnings.cpp b/lib/Frontend/Warnings.cpp index 1866949e15..ec5fde0c3e 100644 --- a/lib/Frontend/Warnings.cpp +++ b/lib/Frontend/Warnings.cpp @@ -73,7 +73,7 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, Diags.setExtensionHandlingBehavior(DiagnosticsEngine::Ext_Ignore); llvm::SmallVector<diag::kind, 10> _Diags; - const llvm::IntrusiveRefCntPtr< DiagnosticIDs > DiagIDs = + const IntrusiveRefCntPtr< DiagnosticIDs > DiagIDs = Diags.getDiagnosticIDs(); // We parse the warning options twice. The first pass sets diagnostic state, // while the second pass reports warnings/errors. This has the effect that |