diff options
Diffstat (limited to 'include/clang')
25 files changed, 60 insertions, 56 deletions
diff --git a/include/clang/ARCMigrate/FileRemapper.h b/include/clang/ARCMigrate/FileRemapper.h index 9a0b690ad6..a451988f93 100644 --- a/include/clang/ARCMigrate/FileRemapper.h +++ b/include/clang/ARCMigrate/FileRemapper.h @@ -30,7 +30,7 @@ namespace arcmt { class FileRemapper { // FIXME: Reuse the same FileManager for multiple ASTContexts. - llvm::OwningPtr<FileManager> FileMgr; + OwningPtr<FileManager> FileMgr; typedef llvm::PointerUnion<const FileEntry *, llvm::MemoryBuffer *> Target; typedef llvm::DenseMap<const FileEntry *, Target> MappingsTy; diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index fee8a0573f..a23447197b 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -349,7 +349,7 @@ class ASTContext : public llvm::RefCountedBase<ASTContext> { PartialDiagnosticStorageAllocator *DiagAllocator; /// \brief The current C++ ABI. - llvm::OwningPtr<CXXABI> ABI; + OwningPtr<CXXABI> ABI; CXXABI *createCXXABI(const TargetInfo &T); /// \brief The logical -> physical address space map. @@ -367,7 +367,7 @@ public: SelectorTable &Selectors; Builtin::Context &BuiltinInfo; mutable DeclarationNameTable DeclarationNames; - llvm::OwningPtr<ExternalASTSource> ExternalSource; + OwningPtr<ExternalASTSource> ExternalSource; ASTMutationListener *Listener; clang::PrintingPolicy getPrintingPolicy() const { return PrintingPolicy; } @@ -573,7 +573,7 @@ public: /// The external AST source provides the ability to load parts of /// the abstract syntax tree as needed from some external storage, /// e.g., a precompiled header. - void setExternalSource(llvm::OwningPtr<ExternalASTSource> &Source); + void setExternalSource(OwningPtr<ExternalASTSource> &Source); /// \brief Retrieve a pointer to the external AST source associated /// with this AST context, if any. diff --git a/include/clang/Analysis/AnalysisContext.h b/include/clang/Analysis/AnalysisContext.h index 468fff5f23..6b6f8ef2cc 100644 --- a/include/clang/Analysis/AnalysisContext.h +++ b/include/clang/Analysis/AnalysisContext.h @@ -76,19 +76,19 @@ class AnalysisDeclContext { // TranslationUnit is NULL if we don't have multiple translation units. idx::TranslationUnit *TU; - llvm::OwningPtr<CFG> cfg, completeCFG; - llvm::OwningPtr<CFGStmtMap> cfgStmtMap; + OwningPtr<CFG> cfg, completeCFG; + OwningPtr<CFGStmtMap> cfgStmtMap; CFG::BuildOptions cfgBuildOptions; CFG::BuildOptions::ForcedBlkExprs *forcedBlkExprs; bool builtCFG, builtCompleteCFG; - llvm::OwningPtr<LiveVariables> liveness; - llvm::OwningPtr<LiveVariables> relaxedLiveness; - llvm::OwningPtr<ParentMap> PM; - llvm::OwningPtr<PseudoConstantAnalysis> PCA; - llvm::OwningPtr<CFGReverseBlockReachabilityAnalysis> CFA; + OwningPtr<LiveVariables> liveness; + OwningPtr<LiveVariables> relaxedLiveness; + OwningPtr<ParentMap> PM; + OwningPtr<PseudoConstantAnalysis> PCA; + OwningPtr<CFGReverseBlockReachabilityAnalysis> CFA; llvm::BumpPtrAllocator A; diff --git a/include/clang/Basic/FileManager.h b/include/clang/Basic/FileManager.h index d9fe41ac2a..90f71f5203 100644 --- a/include/clang/Basic/FileManager.h +++ b/include/clang/Basic/FileManager.h @@ -148,7 +148,7 @@ class FileManager : public llvm::RefCountedBase<FileManager> { unsigned NumDirCacheMisses, NumFileCacheMisses; // Caching. - llvm::OwningPtr<FileSystemStatCache> StatCache; + OwningPtr<FileSystemStatCache> StatCache; bool getStatValue(const char *Path, struct stat &StatBuf, int *FileDescriptor); diff --git a/include/clang/Basic/FileSystemStatCache.h b/include/clang/Basic/FileSystemStatCache.h index f27312fade..96a2f90ed1 100644 --- a/include/clang/Basic/FileSystemStatCache.h +++ b/include/clang/Basic/FileSystemStatCache.h @@ -14,6 +14,7 @@ #ifndef LLVM_CLANG_FILESYSTEMSTATCACHE_H #define LLVM_CLANG_FILESYSTEMSTATCACHE_H +#include "clang/Basic/LLVM.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/StringMap.h" #include <sys/types.h> @@ -27,7 +28,7 @@ namespace clang { class FileSystemStatCache { virtual void anchor(); protected: - llvm::OwningPtr<FileSystemStatCache> NextStatCache; + OwningPtr<FileSystemStatCache> NextStatCache; public: virtual ~FileSystemStatCache() {} diff --git a/include/clang/Basic/LLVM.h b/include/clang/Basic/LLVM.h index 27c459dee4..005e17bbf9 100644 --- a/include/clang/Basic/LLVM.h +++ b/include/clang/Basic/LLVM.h @@ -24,6 +24,7 @@ namespace llvm { class StringRef; class Twine; template<typename T> class ArrayRef; + template<class T> class OwningPtr; template<typename T, unsigned N> class SmallVector; template<typename T> class SmallVectorImpl; @@ -44,6 +45,7 @@ namespace clang { using llvm::StringRef; using llvm::Twine; using llvm::ArrayRef; + using llvm::OwningPtr; using llvm::SmallVector; using llvm::SmallVectorImpl; diff --git a/include/clang/CodeGen/CodeGenAction.h b/include/clang/CodeGen/CodeGenAction.h index 5c2e2bbe8d..7fa589feeb 100644 --- a/include/clang/CodeGen/CodeGenAction.h +++ b/include/clang/CodeGen/CodeGenAction.h @@ -24,7 +24,7 @@ class BackendConsumer; class CodeGenAction : public ASTFrontendAction { private: unsigned Act; - llvm::OwningPtr<llvm::Module> TheModule; + OwningPtr<llvm::Module> TheModule; llvm::Module *LinkModule; llvm::LLVMContext *VMContext; bool OwnsVMContext; diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h index 4b84e6a8d6..fb368cfaa9 100644 --- a/include/clang/Frontend/ASTUnit.h +++ b/include/clang/Frontend/ASTUnit.h @@ -74,7 +74,7 @@ private: llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diagnostics; llvm::IntrusiveRefCntPtr<FileManager> FileMgr; llvm::IntrusiveRefCntPtr<SourceManager> SourceMgr; - llvm::OwningPtr<HeaderSearch> HeaderInfo; + OwningPtr<HeaderSearch> HeaderInfo; llvm::IntrusiveRefCntPtr<TargetInfo> Target; llvm::IntrusiveRefCntPtr<Preprocessor> PP; llvm::IntrusiveRefCntPtr<ASTContext> Ctx; @@ -84,11 +84,11 @@ private: /// \brief The AST consumer that received information about the translation /// unit as it was parsed or loaded. - llvm::OwningPtr<ASTConsumer> Consumer; + OwningPtr<ASTConsumer> Consumer; /// \brief The semantic analysis object used to type-check the translation /// unit. - llvm::OwningPtr<Sema> TheSema; + OwningPtr<Sema> TheSema; /// Optional owned invocation, just used to make the invocation used in /// LoadFromCommandLine available. diff --git a/include/clang/Frontend/ChainedDiagnosticConsumer.h b/include/clang/Frontend/ChainedDiagnosticConsumer.h index 6ffcec51cf..ce2b242296 100644 --- a/include/clang/Frontend/ChainedDiagnosticConsumer.h +++ b/include/clang/Frontend/ChainedDiagnosticConsumer.h @@ -22,8 +22,8 @@ class LangOptions; /// diagnostics should be included in counts. class ChainedDiagnosticConsumer : public DiagnosticConsumer { virtual void anchor(); - llvm::OwningPtr<DiagnosticConsumer> Primary; - llvm::OwningPtr<DiagnosticConsumer> Secondary; + OwningPtr<DiagnosticConsumer> Primary; + OwningPtr<DiagnosticConsumer> Secondary; public: ChainedDiagnosticConsumer(DiagnosticConsumer *_Primary, diff --git a/include/clang/Frontend/ChainedIncludesSource.h b/include/clang/Frontend/ChainedIncludesSource.h index a08ecb3c99..d7119e9653 100644 --- a/include/clang/Frontend/ChainedIncludesSource.h +++ b/include/clang/Frontend/ChainedIncludesSource.h @@ -30,7 +30,7 @@ private: ExternalSemaSource &getFinalReader() const { return *FinalReader; } std::vector<CompilerInstance *> CIs; - llvm::OwningPtr<ExternalSemaSource> FinalReader; + OwningPtr<ExternalSemaSource> FinalReader; protected: diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index 1e5994fc58..e1cfd73fb3 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -86,16 +86,16 @@ class CompilerInstance : public ModuleLoader { llvm::IntrusiveRefCntPtr<ASTContext> Context; /// The AST consumer. - llvm::OwningPtr<ASTConsumer> Consumer; + OwningPtr<ASTConsumer> Consumer; /// The code completion consumer. - llvm::OwningPtr<CodeCompleteConsumer> CompletionConsumer; + OwningPtr<CodeCompleteConsumer> CompletionConsumer; /// \brief The semantic analysis object. - llvm::OwningPtr<Sema> TheSema; + OwningPtr<Sema> TheSema; /// \brief The frontend timer - llvm::OwningPtr<llvm::Timer> FrontendTimer; + OwningPtr<llvm::Timer> FrontendTimer; /// \brief Non-owning reference to the ASTReader, if one exists. ASTReader *ModuleManager; diff --git a/include/clang/Frontend/FrontendAction.h b/include/clang/Frontend/FrontendAction.h index 80d0d5fe0c..6839028f97 100644 --- a/include/clang/Frontend/FrontendAction.h +++ b/include/clang/Frontend/FrontendAction.h @@ -28,7 +28,7 @@ class CompilerInstance; /// the frontend. class FrontendAction { FrontendInputFile CurrentInput; - llvm::OwningPtr<ASTUnit> CurrentASTUnit; + OwningPtr<ASTUnit> CurrentASTUnit; CompilerInstance *Instance; friend class ASTMergeAction; friend class WrapperFrontendAction; @@ -248,7 +248,7 @@ public: /// implements every virtual method in the FrontendAction interface by /// forwarding to the wrapped action. class WrapperFrontendAction : public FrontendAction { - llvm::OwningPtr<FrontendAction> WrappedAction; + OwningPtr<FrontendAction> WrappedAction; protected: virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI, diff --git a/include/clang/Frontend/MultiplexConsumer.h b/include/clang/Frontend/MultiplexConsumer.h index 7299f73d97..0c4f7dcc39 100644 --- a/include/clang/Frontend/MultiplexConsumer.h +++ b/include/clang/Frontend/MultiplexConsumer.h @@ -17,6 +17,7 @@ #include "clang/Basic/LLVM.h" #include "clang/Sema/SemaConsumer.h" +#include "clang/Basic/LLVM.h" #include "llvm/ADT/OwningPtr.h" #include <vector> @@ -52,8 +53,8 @@ public: static bool classof(const MultiplexConsumer *) { return true; } private: std::vector<ASTConsumer*> Consumers; // Owns these. - llvm::OwningPtr<MultiplexASTMutationListener> MutationListener; - llvm::OwningPtr<MultiplexASTDeserializationListener> DeserializationListener; + OwningPtr<MultiplexASTMutationListener> MutationListener; + OwningPtr<MultiplexASTDeserializationListener> DeserializationListener; }; } // end namespace clang diff --git a/include/clang/Frontend/TextDiagnosticPrinter.h b/include/clang/Frontend/TextDiagnosticPrinter.h index 8051d9ce8b..9b6ac24cca 100644 --- a/include/clang/Frontend/TextDiagnosticPrinter.h +++ b/include/clang/Frontend/TextDiagnosticPrinter.h @@ -31,7 +31,7 @@ class TextDiagnosticPrinter : public DiagnosticConsumer { const SourceManager *SM; /// \brief Handle to the currently active text diagnostic emitter. - llvm::OwningPtr<TextDiagnostic> TextDiag; + OwningPtr<TextDiagnostic> TextDiag; /// A string to prefix to error messages. std::string Prefix; diff --git a/include/clang/Frontend/VerifyDiagnosticConsumer.h b/include/clang/Frontend/VerifyDiagnosticConsumer.h index 28dc9de03a..2fc6ccc36d 100644 --- a/include/clang/Frontend/VerifyDiagnosticConsumer.h +++ b/include/clang/Frontend/VerifyDiagnosticConsumer.h @@ -67,7 +67,7 @@ public: DiagnosticsEngine &Diags; DiagnosticConsumer *PrimaryClient; bool OwnsPrimaryClient; - llvm::OwningPtr<TextDiagnosticBuffer> Buffer; + OwningPtr<TextDiagnosticBuffer> Buffer; Preprocessor *CurrentPreprocessor; private: diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index bf5b9d0939..10d934aab2 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -75,7 +75,7 @@ class Preprocessor : public llvm::RefCountedBase<Preprocessor> { /// PTH - An optional PTHManager object used for getting tokens from /// a token cache rather than lexing the original source file. - llvm::OwningPtr<PTHManager> PTH; + OwningPtr<PTHManager> PTH; /// BP - A BumpPtrAllocator object used to quickly allocate and release /// objects internal to the Preprocessor. @@ -193,12 +193,12 @@ class Preprocessor : public llvm::RefCountedBase<Preprocessor> { /// CurLexer - This is the current top of the stack that we're lexing from if /// not expanding a macro and we are lexing directly from source code. /// Only one of CurLexer, CurPTHLexer, or CurTokenLexer will be non-null. - llvm::OwningPtr<Lexer> CurLexer; + OwningPtr<Lexer> CurLexer; /// CurPTHLexer - This is the current top of stack that we're lexing from if /// not expanding from a macro and we are lexing from a PTH cache. /// Only one of CurLexer, CurPTHLexer, or CurTokenLexer will be non-null. - llvm::OwningPtr<PTHLexer> CurPTHLexer; + OwningPtr<PTHLexer> CurPTHLexer; /// CurPPLexer - This is the current top of the stack what we're lexing from /// if not expanding a macro. This is an alias for either CurLexer or @@ -212,7 +212,7 @@ class Preprocessor : public llvm::RefCountedBase<Preprocessor> { /// CurTokenLexer - This is the current macro we are expanding, if we are /// expanding a macro. One of CurLexer and CurTokenLexer must be null. - llvm::OwningPtr<TokenLexer> CurTokenLexer; + OwningPtr<TokenLexer> CurTokenLexer; /// \brief The kind of lexer we're currently working with. enum CurLexerKind { diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index 6221cfb1d4..7fcc37d41f 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -155,15 +155,15 @@ class Parser : public CodeCompletionHandler { mutable IdentifierInfo *Ident_final; mutable IdentifierInfo *Ident_override; - llvm::OwningPtr<PragmaHandler> AlignHandler; - llvm::OwningPtr<PragmaHandler> GCCVisibilityHandler; - llvm::OwningPtr<PragmaHandler> OptionsHandler; - llvm::OwningPtr<PragmaHandler> PackHandler; - llvm::OwningPtr<PragmaHandler> MSStructHandler; - llvm::OwningPtr<PragmaHandler> UnusedHandler; - llvm::OwningPtr<PragmaHandler> WeakHandler; - llvm::OwningPtr<PragmaHandler> FPContractHandler; - llvm::OwningPtr<PragmaHandler> OpenCLExtensionHandler; + OwningPtr<PragmaHandler> AlignHandler; + OwningPtr<PragmaHandler> GCCVisibilityHandler; + OwningPtr<PragmaHandler> OptionsHandler; + OwningPtr<PragmaHandler> PackHandler; + OwningPtr<PragmaHandler> MSStructHandler; + OwningPtr<PragmaHandler> UnusedHandler; + OwningPtr<PragmaHandler> WeakHandler; + OwningPtr<PragmaHandler> FPContractHandler; + OwningPtr<PragmaHandler> OpenCLExtensionHandler; /// Whether the '>' token acts as an operator or not. This will be /// true except when we are parsing an expression within a C++ diff --git a/include/clang/Rewrite/FrontendActions.h b/include/clang/Rewrite/FrontendActions.h index 03dbd04265..6e9ecace67 100644 --- a/include/clang/Rewrite/FrontendActions.h +++ b/include/clang/Rewrite/FrontendActions.h @@ -28,8 +28,8 @@ protected: class FixItAction : public ASTFrontendAction { protected: - llvm::OwningPtr<FixItRewriter> Rewriter; - llvm::OwningPtr<FixItOptions> FixItOpts; + OwningPtr<FixItRewriter> Rewriter; + OwningPtr<FixItOptions> FixItOpts; virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI, StringRef InFile); diff --git a/include/clang/Rewrite/TokenRewriter.h b/include/clang/Rewrite/TokenRewriter.h index 62ea12af1f..9ebd33a519 100644 --- a/include/clang/Rewrite/TokenRewriter.h +++ b/include/clang/Rewrite/TokenRewriter.h @@ -41,7 +41,7 @@ namespace clang { /// ScratchBuf - This is the buffer that we create scratch tokens from. /// - llvm::OwningPtr<ScratchBuffer> ScratchBuf; + OwningPtr<ScratchBuffer> ScratchBuf; TokenRewriter(const TokenRewriter&); // DO NOT IMPLEMENT void operator=(const TokenRewriter&); // DO NOT IMPLEMENT. diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index a9b6827bd0..d2d61abc7a 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -260,14 +260,14 @@ public: llvm::SmallPtrSet<NamedDecl *, 4> HiddenDefinitions; /// FieldCollector - Collects CXXFieldDecls during parsing of C++ classes. - llvm::OwningPtr<CXXFieldCollector> FieldCollector; + OwningPtr<CXXFieldCollector> FieldCollector; typedef llvm::SmallPtrSet<const CXXRecordDecl*, 8> RecordDeclSetTy; /// PureVirtualClassDiagSet - a set of class declarations which we have /// emitted a list of pure virtual functions. Used to prevent emitting the /// same list more than once. - llvm::OwningPtr<RecordDeclSetTy> PureVirtualClassDiagSet; + OwningPtr<RecordDeclSetTy> PureVirtualClassDiagSet; /// ParsingInitForAutoVars - a set of declarations with auto types for which /// we are currently parsing the initializer. diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index 2ebdd095a7..b99b9c78c6 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -218,7 +218,7 @@ public: private: /// \brief The receiver of some callbacks invoked by ASTReader. - llvm::OwningPtr<ASTReaderListener> Listener; + OwningPtr<ASTReaderListener> Listener; /// \brief The receiver of deserialization events. ASTDeserializationListener *DeserializationListener; diff --git a/include/clang/Serialization/Module.h b/include/clang/Serialization/Module.h index 34f208d71f..4c93c33842 100644 --- a/include/clang/Serialization/Module.h +++ b/include/clang/Serialization/Module.h @@ -77,7 +77,7 @@ public: /// \brief The memory buffer that stores the data associated with /// this AST file. - llvm::OwningPtr<llvm::MemoryBuffer> Buffer; + OwningPtr<llvm::MemoryBuffer> Buffer; /// \brief The size of this file, in bits. uint64_t SizeInBits; diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h index b7294abb52..3a9a1254ba 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h @@ -38,7 +38,7 @@ class AnalysisManager : public BugReporterData { DiagnosticsEngine &Diags; const LangOptions &LangInfo; - llvm::OwningPtr<PathDiagnosticConsumer> PD; + OwningPtr<PathDiagnosticConsumer> PD; // Configurable components creators. StoreManagerCreator CreateStoreMgr; diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h index f393fd1ba0..d9b613664c 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h @@ -58,7 +58,7 @@ private: SubEngine& SubEng; /// G - The simulation graph. Each node is a (location,state) pair. - llvm::OwningPtr<ExplodedGraph> G; + OwningPtr<ExplodedGraph> G; /// WList - A set of queued nodes that need to be processed by the /// worklist algorithm. It is up to the implementation of WList to decide diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h index f19520984e..7779be0e31 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h @@ -394,8 +394,8 @@ private: SubEngine *Eng; /* Can be null. */ EnvironmentManager EnvMgr; - llvm::OwningPtr<StoreManager> StoreMgr; - llvm::OwningPtr<ConstraintManager> ConstraintMgr; + OwningPtr<StoreManager> StoreMgr; + OwningPtr<ConstraintManager> ConstraintMgr; ProgramState::GenericDataMap::Factory GDMFactory; @@ -407,7 +407,7 @@ private: llvm::FoldingSet<ProgramState> StateSet; /// Object that manages the data for all created SVals. - llvm::OwningPtr<SValBuilder> svalBuilder; + OwningPtr<SValBuilder> svalBuilder; /// A BumpPtrAllocator to allocate states. llvm::BumpPtrAllocator &Alloc; @@ -773,7 +773,7 @@ class ScanReachableSymbols : public SubRegionMap::Visitor { VisitedItems visited; ProgramStateRef state; SymbolVisitor &visitor; - llvm::OwningPtr<SubRegionMap> SRM; + OwningPtr<SubRegionMap> SRM; public: ScanReachableSymbols(ProgramStateRef st, SymbolVisitor& v) |