summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/GlobalModuleIndex.cpp
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-03-18 10:17:07 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-03-18 10:17:07 +0000
commit92e1b62d45aa5a3cbd67eaf5903165d7d8efeada (patch)
tree1444da86136cbaaadf6bf12dd03c51eda0f728a3 /clang/lib/Serialization/GlobalModuleIndex.cpp
parent4a7baeab14a9f991752879bdc85ad4bf684cdf46 (diff)
downloadbcm5719-llvm-92e1b62d45aa5a3cbd67eaf5903165d7d8efeada.tar.gz
bcm5719-llvm-92e1b62d45aa5a3cbd67eaf5903165d7d8efeada.zip
Remove many superfluous SmallString::str() calls.
Now that SmallString is a first-class citizen, most SmallString::str() calls are not required. This patch removes a whole bunch of them, yet there are lots more. There are two use cases where str() is really needed: 1) To use one of StringRef member functions which is not available in SmallString. 2) To convert to std::string, as StringRef implicitly converts while SmallString do not. We may wish to change this, but it may introduce ambiguity. llvm-svn: 232622
Diffstat (limited to 'clang/lib/Serialization/GlobalModuleIndex.cpp')
-rw-r--r--clang/lib/Serialization/GlobalModuleIndex.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp
index 47913880454..1b52b441134 100644
--- a/clang/lib/Serialization/GlobalModuleIndex.cpp
+++ b/clang/lib/Serialization/GlobalModuleIndex.cpp
@@ -757,7 +757,7 @@ void GlobalModuleIndexBuilder::writeIndex(llvm::BitstreamWriter &Stream) {
Record.clear();
Record.push_back(IDENTIFIER_INDEX);
Record.push_back(BucketOffset);
- Stream.EmitRecordWithBlob(IDTableAbbrev, Record, IdentifierTable.str());
+ Stream.EmitRecordWithBlob(IDTableAbbrev, Record, IdentifierTable);
}
Stream.ExitBlock();
@@ -841,12 +841,12 @@ GlobalModuleIndex::writeIndex(FileManager &FileMgr, StringRef Path) {
return EC_IOError;
// Remove the old index file. It isn't relevant any more.
- llvm::sys::fs::remove(IndexPath.str());
+ llvm::sys::fs::remove(IndexPath);
// Rename the newly-written index file to the proper name.
- if (llvm::sys::fs::rename(IndexTmpPath.str(), IndexPath.str())) {
+ if (llvm::sys::fs::rename(IndexTmpPath, IndexPath)) {
// Rename failed; just remove the
- llvm::sys::fs::remove(IndexTmpPath.str());
+ llvm::sys::fs::remove(IndexTmpPath);
return EC_IOError;
}
OpenPOWER on IntegriCloud