aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic
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/Basic
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/Basic')
-rw-r--r--lib/Basic/Diagnostic.cpp2
-rw-r--r--lib/Basic/FileManager.cpp10
-rw-r--r--lib/Basic/IdentifierTable.cpp4
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp
index 67e62297b2..7905246447 100644
--- a/lib/Basic/Diagnostic.cpp
+++ b/lib/Basic/Diagnostic.cpp
@@ -809,7 +809,7 @@ StoredDiagnostic::StoredDiagnostic(DiagnosticsEngine::Level Level,
"Valid source location without setting a source manager for diagnostic");
if (Info.getLocation().isValid())
Loc = FullSourceLoc(Info.getLocation(), Info.getSourceManager());
- llvm::SmallString<64> Message;
+ SmallString<64> Message;
Info.FormatDiagnostic(Message);
this->Message.assign(Message.begin(), Message.end());
diff --git a/lib/Basic/FileManager.cpp b/lib/Basic/FileManager.cpp
index 267db48352..fd6d33463a 100644
--- a/lib/Basic/FileManager.cpp
+++ b/lib/Basic/FileManager.cpp
@@ -477,7 +477,7 @@ void FileManager::FixupRelativePath(SmallVectorImpl<char> &path) const {
|| llvm::sys::path::is_absolute(pathRef))
return;
- llvm::SmallString<128> NewPath(FileSystemOpts.WorkingDir);
+ SmallString<128> NewPath(FileSystemOpts.WorkingDir);
llvm::sys::path::append(NewPath, pathRef);
path = NewPath;
}
@@ -509,7 +509,7 @@ getBufferForFile(const FileEntry *Entry, std::string *ErrorStr) {
return Result.take();
}
- llvm::SmallString<128> FilePath(Entry->getName());
+ SmallString<128> FilePath(Entry->getName());
FixupRelativePath(FilePath);
ec = llvm::MemoryBuffer::getFile(FilePath.str(), Result, Entry->getSize());
if (ec && ErrorStr)
@@ -528,7 +528,7 @@ getBufferForFile(StringRef Filename, std::string *ErrorStr) {
return Result.take();
}
- llvm::SmallString<128> FilePath(Filename);
+ SmallString<128> FilePath(Filename);
FixupRelativePath(FilePath);
ec = llvm::MemoryBuffer::getFile(FilePath.c_str(), Result);
if (ec && ErrorStr)
@@ -549,7 +549,7 @@ bool FileManager::getStatValue(const char *Path, struct stat &StatBuf,
return FileSystemStatCache::get(Path, StatBuf, FileDescriptor,
StatCache.get());
- llvm::SmallString<128> FilePath(Path);
+ SmallString<128> FilePath(Path);
FixupRelativePath(FilePath);
return FileSystemStatCache::get(FilePath.c_str(), StatBuf, FileDescriptor,
@@ -558,7 +558,7 @@ bool FileManager::getStatValue(const char *Path, struct stat &StatBuf,
bool FileManager::getNoncachedStatValue(StringRef Path,
struct stat &StatBuf) {
- llvm::SmallString<128> FilePath(Path);
+ SmallString<128> FilePath(Path);
FixupRelativePath(FilePath);
return ::stat(FilePath.c_str(), &StatBuf) != 0;
diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp
index bc1f175b30..8bd76252b3 100644
--- a/lib/Basic/IdentifierTable.cpp
+++ b/lib/Basic/IdentifierTable.cpp
@@ -356,7 +356,7 @@ StringRef Selector::getNameForSlot(unsigned int argIndex) const {
}
std::string MultiKeywordSelector::getName() const {
- llvm::SmallString<256> Str;
+ SmallString<256> Str;
llvm::raw_svector_ostream OS(Str);
for (keyword_iterator I = keyword_begin(), E = keyword_end(); I != E; ++I) {
if (*I)
@@ -458,7 +458,7 @@ static SelectorTableImpl &getSelectorTableImpl(void *P) {
SelectorTable::constructSetterName(IdentifierTable &Idents,
SelectorTable &SelTable,
const IdentifierInfo *Name) {
- llvm::SmallString<100> SelectorName;
+ SmallString<100> SelectorName;
SelectorName = "set";
SelectorName += Name->getName();
SelectorName[3] = toupper(SelectorName[3]);