aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Noblesmith <nobled@dreamwidth.org>2012-02-05 02:12:40 +0000
committerDylan Noblesmith <nobled@dreamwidth.org>2012-02-05 02:12:40 +0000
commit6f42b62b6194f53bcbc349f5d17388e1936535d7 (patch)
treef77ceb8fa36a96578328dfa74f495841a4b92f43
parent7af19b817ba964ac560b50c1ed6183235f699789 (diff)
Basic: import OwningPtr<> into clang namespace
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149798 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/ARCMigrate/FileRemapper.h2
-rw-r--r--include/clang/AST/ASTContext.h6
-rw-r--r--include/clang/Analysis/AnalysisContext.h14
-rw-r--r--include/clang/Basic/FileManager.h2
-rw-r--r--include/clang/Basic/FileSystemStatCache.h3
-rw-r--r--include/clang/Basic/LLVM.h2
-rw-r--r--include/clang/CodeGen/CodeGenAction.h2
-rw-r--r--include/clang/Frontend/ASTUnit.h6
-rw-r--r--include/clang/Frontend/ChainedDiagnosticConsumer.h4
-rw-r--r--include/clang/Frontend/ChainedIncludesSource.h2
-rw-r--r--include/clang/Frontend/CompilerInstance.h8
-rw-r--r--include/clang/Frontend/FrontendAction.h4
-rw-r--r--include/clang/Frontend/MultiplexConsumer.h5
-rw-r--r--include/clang/Frontend/TextDiagnosticPrinter.h2
-rw-r--r--include/clang/Frontend/VerifyDiagnosticConsumer.h2
-rw-r--r--include/clang/Lex/Preprocessor.h8
-rw-r--r--include/clang/Parse/Parser.h18
-rw-r--r--include/clang/Rewrite/FrontendActions.h4
-rw-r--r--include/clang/Rewrite/TokenRewriter.h2
-rw-r--r--include/clang/Sema/Sema.h4
-rw-r--r--include/clang/Serialization/ASTReader.h2
-rw-r--r--include/clang/Serialization/Module.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h8
-rw-r--r--lib/ARCMigrate/ARCMT.cpp12
-rw-r--r--lib/ARCMigrate/FileRemapper.cpp2
-rw-r--r--lib/ARCMigrate/TransRetainReleaseDealloc.cpp2
-rw-r--r--lib/ARCMigrate/TransUnbridgedCasts.cpp2
-rw-r--r--lib/AST/ASTContext.cpp2
-rw-r--r--lib/Analysis/CFG.cpp2
-rw-r--r--lib/Basic/FileManager.cpp4
-rw-r--r--lib/Basic/Targets.cpp2
-rw-r--r--lib/CodeGen/CGBlocks.cpp2
-rw-r--r--lib/CodeGen/CGCXXABI.h2
-rw-r--r--lib/CodeGen/CGVTables.cpp2
-rw-r--r--lib/CodeGen/CodeGenAction.cpp6
-rw-r--r--lib/CodeGen/ModuleBuilder.cpp6
-rw-r--r--lib/Driver/Driver.cpp2
-rw-r--r--lib/Driver/ToolChains.cpp2
-rw-r--r--lib/Frontend/ASTUnit.cpp32
-rw-r--r--lib/Frontend/ChainedIncludesSource.cpp14
-rw-r--r--lib/Frontend/CompilerInstance.cpp14
-rw-r--r--lib/Frontend/CompilerInvocation.cpp4
-rw-r--r--lib/Frontend/CreateInvocationFromCommandLine.cpp4
-rw-r--r--lib/Frontend/FrontendAction.cpp8
-rw-r--r--lib/Frontend/SerializedDiagnosticPrinter.cpp2
-rw-r--r--lib/FrontendTool/ExecuteCompilerInvocation.cpp6
-rw-r--r--lib/Lex/HeaderMap.cpp2
-rw-r--r--lib/Lex/PTHLexer.cpp6
-rw-r--r--lib/Parse/ParseAST.cpp4
-rw-r--r--lib/Rewrite/FixItRewriter.cpp2
-rw-r--r--lib/Rewrite/FrontendActions.cpp4
-rw-r--r--lib/Sema/SemaLookup.cpp2
-rw-r--r--lib/Serialization/ASTReader.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp10
-rw-r--r--lib/StaticAnalyzer/Checkers/CStringChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp22
-rw-r--r--lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/ChrootChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/MallocChecker.cpp10
-rw-r--r--lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp14
-rw-r--r--lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/StreamChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Core/BugReporter.cpp12
-rw-r--r--lib/StaticAnalyzer/Core/ExplodedGraph.cpp2
-rw-r--r--lib/StaticAnalyzer/Core/PlistDiagnostics.cpp2
-rw-r--r--lib/StaticAnalyzer/Core/RegionStore.cpp4
-rw-r--r--lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp10
-rw-r--r--lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp2
97 files changed, 219 insertions, 215 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/