aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-07-20 06:58:45 +0000
committerChris Lattner <sabre@nondot.org>2011-07-20 06:58:45 +0000
commit686775deca8b8685eb90801495880e3abdd844c2 (patch)
tree64e6e34d0e6d1078631305a3f1ac1dfb821f4a59 /include
parent9594675cc1eb52a054de13c4a21e466643847480 (diff)
now that we have a centralized place to do so, add some using declarations for
some common llvm types: stringref and smallvector. This cleans up the codebase quite a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/ARCMigrate/ARCMT.h18
-rw-r--r--include/clang/ARCMigrate/ARCMTActions.h4
-rw-r--r--include/clang/ARCMigrate/FileRemapper.h17
-rw-r--r--include/clang/AST/ASTContext.h12
-rw-r--r--include/clang/AST/ASTDiagnostic.h4
-rw-r--r--include/clang/AST/ASTImporter.h2
-rw-r--r--include/clang/AST/Attr.h4
-rw-r--r--include/clang/AST/CXXInheritance.h14
-rw-r--r--include/clang/AST/Decl.h2
-rw-r--r--include/clang/AST/DeclBase.h2
-rw-r--r--include/clang/AST/DeclContextInternals.h2
-rw-r--r--include/clang/AST/DeclObjC.h4
-rw-r--r--include/clang/AST/DeclTemplate.h2
-rw-r--r--include/clang/AST/Expr.h16
-rw-r--r--include/clang/AST/ExprObjC.h2
-rw-r--r--include/clang/AST/ExternalASTSource.h10
-rw-r--r--include/clang/AST/Mangle.h10
-rw-r--r--include/clang/AST/Stmt.h16
-rw-r--r--include/clang/AST/TemplateBase.h2
-rw-r--r--include/clang/AST/Type.h2
-rw-r--r--include/clang/AST/UnresolvedSet.h4
-rw-r--r--include/clang/Analysis/Analyses/FormatString.h4
-rw-r--r--include/clang/Analysis/DomainSpecific/CocoaConventions.h6
-rw-r--r--include/clang/Analysis/FlowSensitive/DataflowSolver.h2
-rw-r--r--include/clang/Basic/Builtins.h7
-rw-r--r--include/clang/Basic/DelayedCleanupPool.h5
-rw-r--r--include/clang/Basic/Diagnostic.h40
-rw-r--r--include/clang/Basic/DiagnosticIDs.h19
-rw-r--r--include/clang/Basic/FileManager.h21
-rw-r--r--include/clang/Basic/IdentifierTable.h19
-rw-r--r--include/clang/Basic/LLVM.h18
-rw-r--r--include/clang/Basic/PartialDiagnostic.h4
-rw-r--r--include/clang/Basic/SourceLocation.h4
-rw-r--r--include/clang/Basic/SourceManager.h4
-rw-r--r--include/clang/Basic/SourceManagerInternals.h2
-rw-r--r--include/clang/Basic/TargetInfo.h15
-rw-r--r--include/clang/CodeGen/CodeGenAction.h2
-rw-r--r--include/clang/Driver/Action.h4
-rw-r--r--include/clang/Driver/Arg.h6
-rw-r--r--include/clang/Driver/ArgList.h41
-rw-r--r--include/clang/Driver/Driver.h10
-rw-r--r--include/clang/Driver/Job.h2
-rw-r--r--include/clang/Driver/Option.h6
-rw-r--r--include/clang/Driver/Tool.h6
-rw-r--r--include/clang/Driver/ToolChain.h8
-rw-r--r--include/clang/Driver/Util.h8
-rw-r--r--include/clang/Frontend/ASTUnit.h28
-rw-r--r--include/clang/Frontend/CommandLineSourceLoc.h7
-rw-r--r--include/clang/Frontend/CompilerInstance.h24
-rw-r--r--include/clang/Frontend/FrontendAction.h19
-rw-r--r--include/clang/Frontend/FrontendActions.h24
-rw-r--r--include/clang/Frontend/FrontendOptions.h2
-rw-r--r--include/clang/Frontend/HeaderSearchOptions.h6
-rw-r--r--include/clang/Frontend/LangStandard.h3
-rw-r--r--include/clang/Frontend/LogDiagnosticPrinter.h4
-rw-r--r--include/clang/Frontend/PreprocessorOptions.h8
-rw-r--r--include/clang/Frontend/Utils.h4
-rw-r--r--include/clang/Index/Entity.h3
-rw-r--r--include/clang/Index/Handlers.h3
-rw-r--r--include/clang/Lex/DirectoryLookup.h12
-rw-r--r--include/clang/Lex/HeaderMap.h6
-rw-r--r--include/clang/Lex/HeaderSearch.h14
-rw-r--r--include/clang/Lex/Lexer.h6
-rw-r--r--include/clang/Lex/LiteralSupport.h5
-rw-r--r--include/clang/Lex/MacroInfo.h4
-rw-r--r--include/clang/Lex/PPCallbacks.h32
-rw-r--r--include/clang/Lex/PTHManager.h2
-rw-r--r--include/clang/Lex/Pragma.h9
-rw-r--r--include/clang/Lex/PreprocessingRecord.h12
-rw-r--r--include/clang/Lex/Preprocessor.h30
-rw-r--r--include/clang/Lex/PreprocessorLexer.h4
-rw-r--r--include/clang/Parse/Parser.h46
-rw-r--r--include/clang/Rewrite/FrontendActions.h8
-rw-r--r--include/clang/Rewrite/Rewriter.h20
-rw-r--r--include/clang/Sema/AttributeList.h2
-rw-r--r--include/clang/Sema/CXXFieldCollector.h4
-rw-r--r--include/clang/Sema/CodeCompleteConsumer.h10
-rw-r--r--include/clang/Sema/DeclSpec.h4
-rw-r--r--include/clang/Sema/DelayedDiagnostic.h6
-rw-r--r--include/clang/Sema/Designator.h2
-rw-r--r--include/clang/Sema/ExternalSemaSource.h2
-rw-r--r--include/clang/Sema/IdentifierResolver.h2
-rw-r--r--include/clang/Sema/Initialization.h4
-rw-r--r--include/clang/Sema/Overload.h12
-rw-r--r--include/clang/Sema/Ownership.h3
-rw-r--r--include/clang/Sema/Scope.h2
-rw-r--r--include/clang/Sema/ScopeInfo.h8
-rw-r--r--include/clang/Sema/Sema.h94
-rw-r--r--include/clang/Sema/Template.h12
-rw-r--r--include/clang/Sema/TemplateDeduction.h4
-rw-r--r--include/clang/Serialization/ASTReader.h98
-rw-r--r--include/clang/Serialization/ASTWriter.h20
-rw-r--r--include/clang/Serialization/ChainedIncludesSource.h2
-rw-r--r--include/clang/Serialization/ContinuousRangeMap.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h52
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/BugType.h8
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h26
-rw-r--r--include/clang/StaticAnalyzer/Core/CheckerManager.h6
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h6
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h4
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h4
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/Store.h4
-rw-r--r--include/clang/StaticAnalyzer/Frontend/FrontendActions.h2
104 files changed, 593 insertions, 571 deletions
diff --git a/include/clang/ARCMigrate/ARCMT.h b/include/clang/ARCMigrate/ARCMT.h
index 147ac2fd85..9b4f595d2f 100644
--- a/include/clang/ARCMigrate/ARCMT.h
+++ b/include/clang/ARCMigrate/ARCMT.h
@@ -37,17 +37,17 @@ namespace arcmt {
///
/// \returns false if no error is produced, true otherwise.
bool checkForManualIssues(CompilerInvocation &CI,
- llvm::StringRef Filename, InputKind Kind,
+ StringRef Filename, InputKind Kind,
DiagnosticClient *DiagClient,
bool emitPremigrationARCErrors = false,
- llvm::StringRef plistOut = llvm::StringRef());
+ StringRef plistOut = StringRef());
/// \brief Works similar to checkForManualIssues but instead of checking, it
/// applies automatic modifications to source files to conform to ARC.
///
/// \returns false if no error is produced, true otherwise.
bool applyTransformations(CompilerInvocation &origCI,
- llvm::StringRef Filename, InputKind Kind,
+ StringRef Filename, InputKind Kind,
DiagnosticClient *DiagClient);
/// \brief Applies automatic modifications and produces temporary files
@@ -62,18 +62,18 @@ bool applyTransformations(CompilerInvocation &origCI,
///
/// \returns false if no error is produced, true otherwise.
bool migrateWithTemporaryFiles(CompilerInvocation &origCI,
- llvm::StringRef Filename, InputKind Kind,
+ StringRef Filename, InputKind Kind,
DiagnosticClient *DiagClient,
- llvm::StringRef outputDir,
+ StringRef outputDir,
bool emitPremigrationARCErrors,
- llvm::StringRef plistOut);
+ StringRef plistOut);
/// \brief Get the set of file remappings from the \arg outputDir path that
/// migrateWithTemporaryFiles produced.
///
/// \returns false if no error is produced, true otherwise.
bool getFileRemappings(std::vector<std::pair<std::string,std::string> > &remap,
- llvm::StringRef outputDir,
+ StringRef outputDir,
DiagnosticClient *DiagClient);
typedef void (*TransformFn)(MigrationPass &pass);
@@ -87,7 +87,7 @@ class MigrationProcess {
public:
MigrationProcess(const CompilerInvocation &CI, DiagnosticClient *diagClient,
- llvm::StringRef outputDir = llvm::StringRef());
+ StringRef outputDir = StringRef());
class RewriteListener {
public:
@@ -96,7 +96,7 @@ public:
virtual void start(ASTContext &Ctx) { }
virtual void finish() { }
- virtual void insert(SourceLocation loc, llvm::StringRef text) { }
+ virtual void insert(SourceLocation loc, StringRef text) { }
virtual void remove(CharSourceRange range) { }
};
diff --git a/include/clang/ARCMigrate/ARCMTActions.h b/include/clang/ARCMigrate/ARCMTActions.h
index 457e8c3eda..4eac4facdd 100644
--- a/include/clang/ARCMigrate/ARCMTActions.h
+++ b/include/clang/ARCMigrate/ARCMTActions.h
@@ -40,8 +40,8 @@ protected:
virtual bool BeginInvocation(CompilerInstance &CI);
public:
- MigrateAction(FrontendAction *WrappedAction, llvm::StringRef migrateDir,
- llvm::StringRef plistOut,
+ MigrateAction(FrontendAction *WrappedAction, StringRef migrateDir,
+ StringRef plistOut,
bool emitPremigrationARCErrors);
};
diff --git a/include/clang/ARCMigrate/FileRemapper.h b/include/clang/ARCMigrate/FileRemapper.h
index 809f6a5f71..8a4e132ecc 100644
--- a/include/clang/ARCMigrate/FileRemapper.h
+++ b/include/clang/ARCMigrate/FileRemapper.h
@@ -10,6 +10,7 @@
#ifndef LLVM_CLANG_ARCMIGRATE_FILEREMAPPER_H
#define LLVM_CLANG_ARCMIGRATE_FILEREMAPPER_H
+#include "clang/Basic/LLVM.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/DenseMap.h"
@@ -41,32 +42,32 @@ public:
FileRemapper();
~FileRemapper();
- bool initFromDisk(llvm::StringRef outputDir, Diagnostic &Diag,
+ bool initFromDisk(StringRef outputDir, Diagnostic &Diag,
bool ignoreIfFilesChanged);
- bool flushToDisk(llvm::StringRef outputDir, Diagnostic &Diag);
+ bool flushToDisk(StringRef outputDir, Diagnostic &Diag);
bool overwriteOriginal(Diagnostic &Diag,
- llvm::StringRef outputDir = llvm::StringRef());
+ StringRef outputDir = StringRef());
- void remap(llvm::StringRef filePath, llvm::MemoryBuffer *memBuf);
- void remap(llvm::StringRef filePath, llvm::StringRef newPath);
+ void remap(StringRef filePath, llvm::MemoryBuffer *memBuf);
+ void remap(StringRef filePath, StringRef newPath);
void applyMappings(CompilerInvocation &CI) const;
void transferMappingsAndClear(CompilerInvocation &CI);
- void clear(llvm::StringRef outputDir = llvm::StringRef());
+ void clear(StringRef outputDir = StringRef());
private:
void remap(const FileEntry *file, llvm::MemoryBuffer *memBuf);
void remap(const FileEntry *file, const FileEntry *newfile);
- const FileEntry *getOriginalFile(llvm::StringRef filePath);
+ const FileEntry *getOriginalFile(StringRef filePath);
void resetTarget(Target &targ);
bool report(const std::string &err, Diagnostic &Diag);
- std::string getRemapInfoFile(llvm::StringRef outputDir);
+ std::string getRemapInfoFile(StringRef outputDir);
};
} // end namespace arcmt
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index 1526f36ba2..ba538e96ec 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -599,7 +599,7 @@ public:
}
/// This builds the struct used for __block variables.
- QualType BuildByRefType(llvm::StringRef DeclName, QualType Ty) const;
+ QualType BuildByRefType(StringRef DeclName, QualType Ty) const;
/// Returns true iff we need copy/dispose helpers for the given type.
bool BlockRequiresCopying(QualType Ty) const;
@@ -1166,11 +1166,11 @@ public:
MangleContext *createMangleContext();
void ShallowCollectObjCIvars(const ObjCInterfaceDecl *OI,
- llvm::SmallVectorImpl<ObjCIvarDecl*> &Ivars)
+ SmallVectorImpl<ObjCIvarDecl*> &Ivars)
const;
void DeepCollectObjCIvars(const ObjCInterfaceDecl *OI, bool leafClass,
- llvm::SmallVectorImpl<ObjCIvarDecl*> &Ivars) const;