diff options
106 files changed, 238 insertions, 236 deletions
diff --git a/include/clang/AST/Mangle.h b/include/clang/AST/Mangle.h index 7c7495ee67..ed392ab6b6 100644 --- a/include/clang/AST/Mangle.h +++ b/include/clang/AST/Mangle.h @@ -60,7 +60,7 @@ public: private: StringRef String; - llvm::SmallString<256> Buffer; + SmallString<256> Buffer; }; /// MangleContext - Context for tracking state which persists across multiple diff --git a/include/clang/Basic/LLVM.h b/include/clang/Basic/LLVM.h index 005e17bbf9..49f18a815e 100644 --- a/include/clang/Basic/LLVM.h +++ b/include/clang/Basic/LLVM.h @@ -25,6 +25,7 @@ namespace llvm { class Twine; template<typename T> class ArrayRef; template<class T> class OwningPtr; + template<unsigned InternalLen> class SmallString; template<typename T, unsigned N> class SmallVector; template<typename T> class SmallVectorImpl; @@ -46,6 +47,7 @@ namespace clang { using llvm::Twine; using llvm::ArrayRef; using llvm::OwningPtr; + using llvm::SmallString; using llvm::SmallVector; using llvm::SmallVectorImpl; diff --git a/include/clang/Lex/LiteralSupport.h b/include/clang/Lex/LiteralSupport.h index 635d3cb67e..1aabc63d54 100644 --- a/include/clang/Lex/LiteralSupport.h +++ b/include/clang/Lex/LiteralSupport.h @@ -155,7 +155,7 @@ class StringLiteralParser { unsigned SizeBound; unsigned CharByteWidth; tok::TokenKind Kind; - llvm::SmallString<512> ResultBuf; + SmallString<512> ResultBuf; char *ResultPtr; // cursor public: StringLiteralParser(const Token *StringToks, unsigned NumStringToks, diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index 10d934aab2..77dc2348a5 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -1054,7 +1054,7 @@ public: /// This code concatenates and consumes tokens up to the '>' token. It /// returns false if the > was found, otherwise it returns true if it finds /// and consumes the EOD marker. - bool ConcatenateIncludeName(llvm::SmallString<128> &FilenameBuffer, + bool ConcatenateIncludeName(SmallString<128> &FilenameBuffer, SourceLocation &End); /// LexOnOffSwitch - Lex an on-off-switch (C99 6.10.6p2) and verify that it is 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)) { |