aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDylan Noblesmith <nobled@dreamwidth.org>2012-02-05 02:13:05 +0000
committerDylan Noblesmith <nobled@dreamwidth.org>2012-02-05 02:13:05 +0000
commitf7ccbad5d9949e7ddd1cbef43d482553b811e026 (patch)
tree1c2ab53fd417f5f54e55420b2807abacb972125b /lib
parent6f42b62b6194f53bcbc349f5d17388e1936535d7 (diff)
Basic: import SmallString<> into clang namespace
(I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/ARCMigrate/ARCMT.cpp4
-rw-r--r--lib/ARCMigrate/FileRemapper.cpp8
-rw-r--r--lib/ARCMigrate/TransGCAttrs.cpp2
-rw-r--r--lib/ARCMigrate/TransUnbridgedCasts.cpp2
-rw-r--r--lib/AST/ASTContext.cpp2
-rw-r--r--lib/AST/DumpXML.cpp4
-rw-r--r--lib/AST/Expr.cpp4
-rw-r--r--lib/AST/ItaniumMangle.cpp6
-rw-r--r--lib/AST/Mangle.cpp8
-rw-r--r--lib/AST/StmtPrinter.cpp2
-rw-r--r--lib/AST/TemplateBase.cpp4
-rw-r--r--lib/Basic/Diagnostic.cpp2
-rw-r--r--lib/Basic/FileManager.cpp10
-rw-r--r--lib/Basic/IdentifierTable.cpp4
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp6
-rw-r--r--lib/CodeGen/CGExpr.cpp2
-rw-r--r--lib/CodeGen/CGObjCMac.cpp10
-rw-r--r--lib/CodeGen/CGRTTI.cpp8
-rw-r--r--lib/CodeGen/CGVTT.cpp2
-rw-r--r--lib/CodeGen/CGVTables.cpp6
-rw-r--r--lib/CodeGen/CodeGenModule.cpp4
-rw-r--r--lib/CodeGen/CodeGenTBAA.cpp2
-rw-r--r--lib/CodeGen/CodeGenTypes.cpp2
-rw-r--r--lib/CodeGen/ItaniumCXXABI.cpp2
-rw-r--r--lib/Driver/Arg.cpp4
-rw-r--r--lib/Driver/ArgList.cpp2
-rw-r--r--lib/Driver/Driver.cpp6
-rw-r--r--lib/Driver/ToolChains.cpp4
-rw-r--r--lib/Driver/Tools.cpp14
-rw-r--r--lib/Frontend/ASTUnit.cpp2
-rw-r--r--lib/Frontend/CacheTokens.cpp2
-rw-r--r--lib/Frontend/CompilerInstance.cpp10
-rw-r--r--lib/Frontend/CreateInvocationFromCommandLine.cpp2
-rw-r--r--lib/Frontend/DiagnosticRenderer.cpp4
-rw-r--r--lib/Frontend/FrontendActions.cpp12
-rw-r--r--lib/Frontend/HeaderIncludeGen.cpp4
-rw-r--r--lib/Frontend/InitHeaderSearch.cpp2
-rw-r--r--lib/Frontend/InitPreprocessor.cpp2
-rw-r--r--lib/Frontend/LogDiagnosticPrinter.cpp4
-rw-r--r--lib/Frontend/PrintPreprocessedOutput.cpp4
-rw-r--r--lib/Frontend/SerializedDiagnosticPrinter.cpp4
-rw-r--r--lib/Frontend/TextDiagnostic.cpp4
-rw-r--r--lib/Frontend/TextDiagnosticBuffer.cpp2
-rw-r--r--lib/Frontend/TextDiagnosticPrinter.cpp2
-rw-r--r--lib/Frontend/VerifyDiagnosticConsumer.cpp4
-rw-r--r--lib/Lex/HeaderMap.cpp2
-rw-r--r--lib/Lex/HeaderSearch.cpp30
-rw-r--r--lib/Lex/LiteralSupport.cpp4
-rw-r--r--lib/Lex/MacroArgs.cpp2
-rw-r--r--lib/Lex/ModuleMap.cpp12
-rw-r--r--lib/Lex/PPDirectives.cpp14
-rw-r--r--lib/Lex/PPExpressions.cpp4
-rw-r--r--lib/Lex/PPLexerChange.cpp4
-rw-r--r--lib/Lex/PPMacroExpansion.cpp6
-rw-r--r--lib/Lex/Pragma.cpp2
-rw-r--r--lib/Lex/Preprocessor.cpp2
-rw-r--r--lib/Lex/TokenLexer.cpp2
-rw-r--r--lib/Parse/ParseDecl.cpp2
-rw-r--r--lib/Parse/ParseDeclCXX.cpp2
-rw-r--r--lib/Parse/ParseInit.cpp2
-rw-r--r--lib/Rewrite/FrontendActions.cpp6
-rw-r--r--lib/Rewrite/HTMLRewrite.cpp2
-rw-r--r--lib/Rewrite/Rewriter.cpp2
-rw-r--r--lib/Sema/CodeCompleteConsumer.cpp2
-rw-r--r--lib/Sema/SemaChecking.cpp8
-rw-r--r--lib/Sema/SemaCodeComplete.cpp2
-rw-r--r--lib/Sema/SemaDecl.cpp2
-rw-r--r--lib/Sema/SemaDeclCXX.cpp4
-rw-r--r--lib/Sema/SemaExceptionSpec.cpp2
-rw-r--r--lib/Sema/SemaExpr.cpp8
-rw-r--r--lib/Sema/SemaExprObjC.cpp2
-rw-r--r--lib/Sema/SemaInit.cpp2
-rw-r--r--lib/Sema/SemaObjCProperty.cpp2
-rw-r--r--lib/Sema/SemaTemplate.cpp2
-rw-r--r--lib/Serialization/ASTReader.cpp8
-rw-r--r--lib/Serialization/ASTReaderStmt.cpp2
-rw-r--r--lib/Serialization/ASTWriter.cpp22
-rw-r--r--lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp8
-rw-r--r--lib/StaticAnalyzer/Checkers/CStringChecker.cpp8
-rw-r--r--lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp12
-rw-r--r--lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp6
-rw-r--r--lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/MallocChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Core/BugReporter.cpp6
-rw-r--r--lib/StaticAnalyzer/Core/BugReporterVisitors.cpp10
102 files changed, 233 insertions, 233 deletions
diff --git a/lib/ARCMigrate/ARCMT.cpp b/lib/ARCMigrate/ARCMT.cpp
index 0e43ab34fd..855f104566 100644
--- a/lib/ARCMigrate/ARCMT.cpp
+++ b/lib/ARCMigrate/ARCMT.cpp
@@ -573,13 +573,13 @@ bool MigrationProcess::applyTransform(TransformFn trans,
assert(file);
std::string newFname = file->getName();
newFname += "-trans";
- llvm::SmallString<512> newText;
+ SmallString<512> newText;
llvm::raw_svector_ostream vecOS(newText);
buf.write(vecOS);
vecOS.flush();
llvm::MemoryBuffer *memBuf = llvm::MemoryBuffer::getMemBufferCopy(
StringRef(newText.data(), newText.size()), newFname);
- llvm::SmallString<64> filePath(file->getName());
+ SmallString<64> filePath(file->getName());
Unit->getFileManager().FixupRelativePath(filePath);
Remapper.remap(filePath.str(), memBuf);
}
diff --git a/lib/ARCMigrate/FileRemapper.cpp b/lib/ARCMigrate/FileRemapper.cpp
index 4a1223226f..0e6e35c748 100644
--- a/lib/ARCMigrate/FileRemapper.cpp
+++ b/lib/ARCMigrate/FileRemapper.cpp
@@ -119,18 +119,18 @@ bool FileRemapper::flushToDisk(StringRef outputDir, DiagnosticsEngine &Diag) {
I = FromToMappings.begin(), E = FromToMappings.end(); I != E; ++I) {
const FileEntry *origFE = I->first;
- llvm::SmallString<200> origPath = StringRef(origFE->getName());
+ SmallString<200> origPath = StringRef(origFE->getName());
fs::make_absolute(origPath);
infoOut << origPath << '\n';
infoOut << (uint64_t)origFE->getModificationTime() << '\n';
if (const FileEntry *FE = I->second.dyn_cast<const FileEntry *>()) {
- llvm::SmallString<200> newPath = StringRef(FE->getName());
+ SmallString<200> newPath = StringRef(FE->getName());
fs::make_absolute(newPath);
infoOut << newPath << '\n';
} else {
- llvm::SmallString<64> tempPath;
+ SmallString<64> tempPath;
tempPath = path::filename(origFE->getName());
tempPath += "-%%%%%%%%";
tempPath += path::extension(origFE->getName());
@@ -276,7 +276,7 @@ void FileRemapper::resetTarget(Target &targ) {
}
bool FileRemapper::report(const Twine &err, DiagnosticsEngine &Diag) {
- llvm::SmallString<128> buf;
+ SmallString<128> buf;
unsigned ID = Diag.getDiagnosticIDs()->getCustomDiagID(DiagnosticIDs::Error,
err.toStringRef(buf));
Diag.Report(ID);
diff --git a/lib/ARCMigrate/TransGCAttrs.cpp b/lib/ARCMigrate/TransGCAttrs.cpp
index 66ff5393df..fa62b36208 100644
--- a/lib/ARCMigrate/TransGCAttrs.cpp
+++ b/lib/ARCMigrate/TransGCAttrs.cpp
@@ -93,7 +93,7 @@ public:
SourceManager &SM = Ctx.getSourceManager();
if (Loc.isMacroID())
Loc = SM.getImmediateExpansionRange(Loc).first;
- llvm::SmallString<32> Buf;
+ SmallString<32> Buf;
bool Invalid = false;
StringRef Spell = Lexer::getSpelling(
SM.getSpellingLoc(TL.getAttrEnumOperandLoc()),
diff --git a/lib/ARCMigrate/TransUnbridgedCasts.cpp b/lib/ARCMigrate/TransUnbridgedCasts.cpp
index 3e5723dd00..48437c795f 100644
--- a/lib/ARCMigrate/TransUnbridgedCasts.cpp
+++ b/lib/ARCMigrate/TransUnbridgedCasts.cpp
@@ -195,7 +195,7 @@ private:
TA.insertAfterToken(CCE->getLParenLoc(), bridge);
} else {
SourceLocation insertLoc = E->getSubExpr()->getLocStart();
- llvm::SmallString<128> newCast;
+ SmallString<128> newCast;
newCast += '(';
newCast += bridge;
newCast += E->getType().getAsString(Pass.Ctx.getPrintingPolicy());
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 335382bb4c..20c5d486c0 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -3966,7 +3966,7 @@ ASTContext::BuildByRefType(StringRef DeclName, QualType Ty) const {
bool HasCopyAndDispose = BlockRequiresCopying(Ty);
// FIXME: Move up
- llvm::SmallString<36> Name;
+ SmallString<36> Name;
llvm::raw_svector_ostream(Name) << "__Block_byref_" <<
++UniqueBlockByRefTypeID << '_' << DeclName;
RecordDecl *T;
diff --git a/lib/AST/DumpXML.cpp b/lib/AST/DumpXML.cpp
index 3ce02b0c55..dcbc5180a0 100644
--- a/lib/AST/DumpXML.cpp
+++ b/lib/AST/DumpXML.cpp
@@ -223,7 +223,7 @@ struct XMLDumper : public XMLDeclVisitor<XMLDumper>,
//---- General utilities -------------------------------------------//
void setPointer(StringRef prop, const void *p) {
- llvm::SmallString<10> buffer;
+ SmallString<10> buffer;
llvm::raw_svector_ostream os(buffer);
os << p;
os.flush();
@@ -239,7 +239,7 @@ struct XMLDumper : public XMLDeclVisitor<XMLDumper>,
}
void setInteger(StringRef prop, unsigned n) {
- llvm::SmallString<10> buffer;
+ SmallString<10> buffer;
llvm::raw_svector_ostream os(buffer);
os << n;
os.flush();
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index fc0b9a7a94..8738e5f885 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -368,7 +368,7 @@ std::string PredefinedExpr::ComputeName(IdentType IT, const Decl *CurrentDecl) {
if (IT != PrettyFunction && IT != PrettyFunctionNoVirtual)
return FD->getNameAsString();
- llvm::SmallString<256> Name;
+ SmallString<256> Name;
llvm::raw_svector_ostream Out(Name);
if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD)) {
@@ -421,7 +421,7 @@ std::string PredefinedExpr::ComputeName(IdentType IT, const Decl *CurrentDecl) {
return Name.str().str();
}
if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(CurrentDecl)) {
- llvm::SmallString<256> Name;
+ SmallString<256> Name;
llvm::raw_svector_ostream Out(Name);
Out << (MD->isInstanceMethod() ? '-' : '+');
Out << '[';
diff --git a/lib/AST/ItaniumMangle.cpp b/lib/AST/ItaniumMangle.cpp
index 5dbcf224cc..9c697ed9b1 100644
--- a/lib/AST/ItaniumMangle.cpp
+++ b/lib/AST/ItaniumMangle.cpp
@@ -1083,7 +1083,7 @@ void CXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
// Mangle it as a source name in the form
// [n] $_<id>
// where n is the length of the string.
- llvm::SmallString<8> Str;
+ SmallString<8> Str;
Str += "$_";
Str += llvm::utostr(AnonStructId);
@@ -1291,7 +1291,7 @@ void CXXNameMangler::manglePrefix(const DeclContext *DC, bool NoFunction) {
if (const BlockDecl *Block = dyn_cast<BlockDecl>(DC)) {
manglePrefix(DC->getParent(), NoFunction);
- llvm::SmallString<64> Name;
+ SmallString<64> Name;
llvm::raw_svector_ostream NameStream(Name);
Context.mangleBlock(Block, NameStream);
NameStream.flush();
@@ -1555,7 +1555,7 @@ void CXXNameMangler::mangleQualifiers(Qualifiers Quals) {
//
// where <address-space-number> is a source name consisting of 'AS'
// followed by the address space <number>.
- llvm::SmallString<64> ASString;
+ SmallString<64> ASString;
ASString = "AS" + llvm::utostr_32(Quals.getAddressSpace());
Out << 'U' << ASString.size() << ASString;
}
diff --git a/lib/AST/Mangle.cpp b/lib/AST/Mangle.cpp
index 68e0098c1a..c1f762be9b 100644
--- a/lib/AST/Mangle.cpp
+++ b/lib/AST/Mangle.cpp
@@ -70,7 +70,7 @@ void MangleContext::mangleCtorBlock(const CXXConstructorDecl *CD,
CXXCtorType CT, const BlockDecl *BD,
raw_ostream &ResStream) {
checkMangleDC(CD, BD);
- llvm::SmallString<64> Buffer;
+ SmallString<64> Buffer;
llvm::raw_svector_ostream Out(Buffer);
mangleCXXCtor(CD, CT, Out);
Out.flush();
@@ -81,7 +81,7 @@ void MangleContext::mangleDtorBlock(const CXXDestructorDecl *DD,
CXXDtorType DT, const BlockDecl *BD,
raw_ostream &ResStream) {
checkMangleDC(DD, BD);
- llvm::SmallString<64> Buffer;
+ SmallString<64> Buffer;
llvm::raw_svector_ostream Out(Buffer);
mangleCXXDtor(DD, DT, Out);
Out.flush();
@@ -93,7 +93,7 @@ void MangleContext::mangleBlock(const DeclContext *DC, const BlockDecl *BD,
assert(!isa<