forked from OSchip/llvm-project
drop more llvm:: prefixes on SmallString<>
More cleanup after r149799. llvm-svn: 150380
This commit is contained in:
parent
1cd1069b68
commit
f1a13f29f2
|
@ -93,7 +93,7 @@ int main(int argc, const char **argv, char * const *envp) {
|
|||
// failed. Extract that job from the compilation.
|
||||
const driver::JobList &Jobs = C->getJobs();
|
||||
if (Jobs.size() != 1 || !isa<driver::Command>(*Jobs.begin())) {
|
||||
llvm::SmallString<256> Msg;
|
||||
SmallString<256> Msg;
|
||||
llvm::raw_svector_ostream OS(Msg);
|
||||
C->PrintJob(OS, C->getJobs(), "; ", true);
|
||||
Diags.Report(diag::err_fe_expected_compiler_job) << OS.str();
|
||||
|
|
|
@ -388,7 +388,7 @@ int main(int argc_, const char **argv_) {
|
|||
// the installed path. We do this manually, because we want to support that
|
||||
// path being a symlink.
|
||||
{
|
||||
llvm::SmallString<128> InstalledPath(argv[0]);
|
||||
SmallString<128> InstalledPath(argv[0]);
|
||||
|
||||
// Do a PATH lookup, if there are no directory components.
|
||||
if (llvm::sys::path::filename(InstalledPath) == InstalledPath) {
|
||||
|
|
|
@ -2898,7 +2898,7 @@ static CXString getDeclSpelling(Decl *D) {
|
|||
if (isa<UsingDirectiveDecl>(D))
|
||||
return createCXString("");
|
||||
|
||||
llvm::SmallString<1024> S;
|
||||
SmallString<1024> S;
|
||||
llvm::raw_svector_ostream os(S);
|
||||
ND->printName(os);
|
||||
|
||||
|
@ -3040,7 +3040,7 @@ CXString clang_getCursorDisplayName(CXCursor C) {
|
|||
D = FunTmpl->getTemplatedDecl();
|
||||
|
||||
if (FunctionDecl *Function = dyn_cast<FunctionDecl>(D)) {
|
||||
llvm::SmallString<64> Str;
|
||||
SmallString<64> Str;
|
||||
llvm::raw_svector_ostream OS(Str);
|
||||
OS << *Function;
|
||||
if (Function->getPrimaryTemplate())
|
||||
|
@ -3062,7 +3062,7 @@ CXString clang_getCursorDisplayName(CXCursor C) {
|
|||
}
|
||||
|
||||
if (ClassTemplateDecl *ClassTemplate = dyn_cast<ClassTemplateDecl>(D)) {
|
||||
llvm::SmallString<64> Str;
|
||||
SmallString<64> Str;
|
||||
llvm::raw_svector_ostream OS(Str);
|
||||
OS << *ClassTemplate;
|
||||
OS << "<";
|
||||
|
@ -3098,7 +3098,7 @@ CXString clang_getCursorDisplayName(CXCursor C) {
|
|||
if (TypeSourceInfo *TSInfo = ClassSpec->getTypeAsWritten())
|
||||
return createCXString(TSInfo->getType().getAsString(Policy));
|
||||
|
||||
llvm::SmallString<64> Str;
|
||||
SmallString<64> Str;
|
||||
llvm::raw_svector_ostream OS(Str);
|
||||
OS << *ClassSpec;
|
||||
OS << TemplateSpecializationType::PrintTemplateArgumentList(
|
||||
|
|
|
@ -698,7 +698,7 @@ void clang_codeCompleteAt_Impl(void *UserData) {
|
|||
#ifdef UDP_CODE_COMPLETION_LOGGER
|
||||
#ifdef UDP_CODE_COMPLETION_LOGGER_PORT
|
||||
const llvm::TimeRecord &EndTime = llvm::TimeRecord::getCurrentTime();
|
||||
llvm::SmallString<256> LogResult;
|
||||
SmallString<256> LogResult;
|
||||
llvm::raw_svector_ostream os(LogResult);
|
||||
|
||||
// Figure out the language and whether or not it uses PCH.
|
||||
|
@ -718,7 +718,7 @@ void clang_codeCompleteAt_Impl(void *UserData) {
|
|||
else if (strcmp(*I, "-include") == 0) {
|
||||
if (I+1 != E) {
|
||||
const char *arg = *(++I);
|
||||
llvm::SmallString<512> pchName;
|
||||
SmallString<512> pchName;
|
||||
{
|
||||
llvm::raw_svector_ostream os(pchName);
|
||||
os << arg << ".pth";
|
||||
|
@ -883,7 +883,7 @@ CXString clang_codeCompleteGetObjCSelector(CXCodeCompleteResults *ResultsIn) {
|
|||
/// \param Buffer A buffer that stores the actual, concatenated string. It will
|
||||
/// be used if the old string is already-non-empty.
|
||||
static void AppendToString(StringRef &Old, StringRef New,
|
||||
llvm::SmallString<256> &Buffer) {
|
||||
SmallString<256> &Buffer) {
|
||||
if (Old.empty()) {
|
||||
Old = New;
|
||||
return;
|
||||
|
@ -903,7 +903,7 @@ static void AppendToString(StringRef &Old, StringRef New,
|
|||
///
|
||||
/// \param Buffer A buffer used for storage of the completed name.
|
||||
static StringRef GetTypedName(CodeCompletionString *String,
|
||||
llvm::SmallString<256> &Buffer) {
|
||||
SmallString<256> &Buffer) {
|
||||
StringRef Result;
|
||||
for (CodeCompletionString::iterator C = String->begin(), CEnd = String->end();
|
||||
C != CEnd; ++C) {
|
||||
|
@ -923,9 +923,9 @@ namespace {
|
|||
CodeCompletionString *Y
|
||||
= (CodeCompletionString *)YR.CompletionString;
|
||||
|
||||
llvm::SmallString<256> XBuffer;
|
||||
SmallString<256> XBuffer;
|
||||
StringRef XText = GetTypedName(X, XBuffer);
|
||||
llvm::SmallString<256> YBuffer;
|
||||
SmallString<256> YBuffer;
|
||||
StringRef YText = GetTypedName(Y, YBuffer);
|
||||
|
||||
if (XText.empty() || YText.empty())
|
||||
|
|
|
@ -126,7 +126,7 @@ CXString clang_formatDiagnostic(CXDiagnostic Diagnostic, unsigned Options) {
|
|||
|
||||
CXDiagnosticSeverity Severity = clang_getDiagnosticSeverity(Diagnostic);
|
||||
|
||||
llvm::SmallString<256> Str;
|
||||
SmallString<256> Str;
|
||||
llvm::raw_svector_ostream Out(Str);
|
||||
|
||||
if (Options & CXDiagnostic_DisplaySourceLocation) {
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace clang::cxstring;
|
|||
|
||||
namespace {
|
||||
class USRGenerator : public DeclVisitor<USRGenerator> {
|
||||
OwningPtr<llvm::SmallString<128> > OwnedBuf;
|
||||
OwningPtr<SmallString<128> > OwnedBuf;
|
||||
SmallVectorImpl<char> &Buf;
|
||||
llvm::raw_svector_ostream Out;
|
||||
bool IgnoreResults;
|
||||
|
@ -41,7 +41,7 @@ class USRGenerator : public DeclVisitor<USRGenerator> {
|
|||
|
||||
public:
|
||||
explicit USRGenerator(ASTContext *Ctx = 0, SmallVectorImpl<char> *extBuf = 0)
|
||||
: OwnedBuf(extBuf ? 0 : new llvm::SmallString<128>()),
|
||||
: OwnedBuf(extBuf ? 0 : new SmallString<128>()),
|
||||
Buf(extBuf ? *extBuf : *OwnedBuf.get()),
|
||||
Out(Buf),
|
||||
IgnoreResults(false),
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace clang {
|
|||
namespace cxstring {
|
||||
|
||||
struct CXStringBuf {
|
||||
llvm::SmallString<128> Data;
|
||||
SmallString<128> Data;
|
||||
CXTranslationUnit TU;
|
||||
CXStringBuf(CXTranslationUnit tu) : TU(tu) {}
|
||||
};
|
||||
|
|
|
@ -994,7 +994,7 @@ void IndexingContext::getEntityInfo(const NamedDecl *D,
|
|||
EntityInfo.name = 0; // anonymous tag/field/namespace.
|
||||
|
||||
} else {
|
||||
llvm::SmallString<256> StrBuf;
|
||||
SmallString<256> StrBuf;
|
||||
{
|
||||
llvm::raw_svector_ostream OS(StrBuf);
|
||||
D->printName(OS);
|
||||
|
@ -1003,7 +1003,7 @@ void IndexingContext::getEntityInfo(const NamedDecl *D,
|
|||
}
|
||||
|
||||
{
|
||||
llvm::SmallString<512> StrBuf;
|
||||
SmallString<512> StrBuf;
|
||||
bool Ignore = getDeclCursorUSR(D, StrBuf);
|
||||
if (Ignore) {
|
||||
EntityInfo.USR = 0;
|
||||
|
|
|
@ -97,7 +97,7 @@ TEST_F(SourceManagerTest, isBeforeInTranslationUnit) {
|
|||
ASSERT_TRUE(macroExpStartLoc.isFileID());
|
||||
ASSERT_TRUE(macroExpEndLoc.isFileID());
|
||||
|
||||
llvm::SmallString<32> str;
|
||||
SmallString<32> str;
|
||||
ASSERT_EQ("M", PP.getSpelling(macroExpStartLoc, str));
|
||||
ASSERT_EQ(")", PP.getSpelling(macroExpEndLoc, str));
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ void ClangDiagsDefsEmitter::run(raw_ostream &OS) {
|
|||
static std::string getDiagCategoryEnum(llvm::StringRef name) {
|
||||
if (name.empty())
|
||||
return "DiagCat_None";
|
||||
llvm::SmallString<256> enumName = llvm::StringRef("DiagCat_");
|
||||
SmallString<256> enumName = llvm::StringRef("DiagCat_");
|
||||
for (llvm::StringRef::iterator I = name.begin(), E = name.end(); I != E; ++I)
|
||||
enumName += isalnum(*I) ? *I : '_';
|
||||
return enumName.str();
|
||||
|
|
Loading…
Reference in New Issue