// 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();
// 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) {
if (isa<UsingDirectiveDecl>(D))
return createCXString("");
- llvm::SmallString<1024> S;
+ SmallString<1024> S;
llvm::raw_svector_ostream os(S);
ND->printName(os);
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())
}
if (ClassTemplateDecl *ClassTemplate = dyn_cast<ClassTemplateDecl>(D)) {
- llvm::SmallString<64> Str;
+ SmallString<64> Str;
llvm::raw_svector_ostream OS(Str);
OS << *ClassTemplate;
OS << "<";
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(
#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.
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";
/// \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;
///
/// \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) {
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())
CXDiagnosticSeverity Severity = clang_getDiagnosticSeverity(Diagnostic);
- llvm::SmallString<256> Str;
+ SmallString<256> Str;
llvm::raw_svector_ostream Out(Str);
if (Options & CXDiagnostic_DisplaySourceLocation) {
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;
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),
namespace cxstring {
struct CXStringBuf {
- llvm::SmallString<128> Data;
+ SmallString<128> Data;
CXTranslationUnit TU;
CXStringBuf(CXTranslationUnit tu) : TU(tu) {}
};
EntityInfo.name = 0; // anonymous tag/field/namespace.
} else {
- llvm::SmallString<256> StrBuf;
+ SmallString<256> StrBuf;
{
llvm::raw_svector_ostream OS(StrBuf);
D->printName(OS);
}
{
- llvm::SmallString<512> StrBuf;
+ SmallString<512> StrBuf;
bool Ignore = getDeclCursorUSR(D, StrBuf);
if (Ignore) {
EntityInfo.USR = 0;
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));
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();