diff options
Diffstat (limited to 'clang/lib/Serialization')
-rw-r--r-- | clang/lib/Serialization/ASTReaderStmt.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 12 | ||||
-rw-r--r-- | clang/lib/Serialization/GlobalModuleIndex.cpp | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp index a1b6c1bf2ee..0f0c7ea9703 100644 --- a/clang/lib/Serialization/ASTReaderStmt.cpp +++ b/clang/lib/Serialization/ASTReaderStmt.cpp @@ -486,7 +486,7 @@ void ASTStmtReader::VisitStringLiteral(StringLiteral *E) { // Read string data SmallString<16> Str(&Record[Idx], &Record[Idx] + Len); - E->setString(Reader.getContext(), Str.str(), kind, isPascal); + E->setString(Reader.getContext(), Str, kind, isPascal); Idx += Len; // Read source locations diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 10a52f81abc..a8e92b8151c 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -1767,7 +1767,7 @@ void ASTWriter::WriteHeaderSearch(const HeaderSearch &HS) { Record.push_back(NumHeaderSearchEntries); Record.push_back(TableData.size()); TableData.append(GeneratorTrait.strings_begin(),GeneratorTrait.strings_end()); - Stream.EmitRecordWithBlob(TableAbbrev, Record, TableData.str()); + Stream.EmitRecordWithBlob(TableAbbrev, Record, TableData); // Free all of the strings we had to duplicate. for (unsigned I = 0, N = SavedStrings.size(); I != N; ++I) @@ -2227,7 +2227,7 @@ void ASTWriter::WritePreprocessor(const Preprocessor &PP, bool IsModule) { Record.push_back(MACRO_TABLE); Record.push_back(BucketOffset); - Stream.EmitRecordWithBlob(MacroTableAbbrev, Record, MacroTable.str()); + Stream.EmitRecordWithBlob(MacroTableAbbrev, Record, MacroTable); Record.clear(); // Write the offsets table for macro IDs. @@ -3061,7 +3061,7 @@ void ASTWriter::WriteSelectors(Sema &SemaRef) { Record.push_back(METHOD_POOL); Record.push_back(BucketOffset); Record.push_back(NumTableEntries); - Stream.EmitRecordWithBlob(MethodPoolAbbrev, Record, MethodPool.str()); + Stream.EmitRecordWithBlob(MethodPoolAbbrev, Record, MethodPool); // Create a blob abbreviation for the selector table offsets. Abbrev = new BitCodeAbbrev(); @@ -3517,7 +3517,7 @@ void ASTWriter::WriteIdentifierTable(Preprocessor &PP, RecordData Record; Record.push_back(IDENTIFIER_TABLE); Record.push_back(BucketOffset); - Stream.EmitRecordWithBlob(IDTableAbbrev, Record, IdentifierTable.str()); + Stream.EmitRecordWithBlob(IDTableAbbrev, Record, IdentifierTable); } // Write the offsets table for identifier IDs. @@ -3835,7 +3835,7 @@ uint64_t ASTWriter::WriteDeclContextVisibleBlock(ASTContext &Context, Record.push_back(DECL_CONTEXT_VISIBLE); Record.push_back(BucketOffset); Stream.EmitRecordWithBlob(DeclContextVisibleLookupAbbrev, Record, - LookupTable.str()); + LookupTable); ++NumVisibleDeclContexts; return Offset; } @@ -3860,7 +3860,7 @@ void ASTWriter::WriteDeclContextVisibleUpdate(const DeclContext *DC) { Record.push_back(UPDATE_VISIBLE); Record.push_back(getDeclID(cast<Decl>(DC))); Record.push_back(BucketOffset); - Stream.EmitRecordWithBlob(UpdateVisibleAbbrev, Record, LookupTable.str()); + Stream.EmitRecordWithBlob(UpdateVisibleAbbrev, Record, LookupTable); } /// \brief Write an FP_PRAGMA_OPTIONS block for the given FPOptions. 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; } |