aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/GlobalModuleIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Serialization/GlobalModuleIndex.cpp')
-rw-r--r--clang/lib/Serialization/GlobalModuleIndex.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp
index 9192b3b..52ce17d 100644
--- a/clang/lib/Serialization/GlobalModuleIndex.cpp
+++ b/clang/lib/Serialization/GlobalModuleIndex.cpp
@@ -905,7 +905,7 @@ GlobalModuleIndex::writeIndex(FileManager &FileMgr,
}
// The output buffer, into which the global index will be written.
- SmallVector<char, 16> OutputBuffer;
+ SmallString<16> OutputBuffer;
{
llvm::BitstreamWriter OutputStream(OutputBuffer);
if (Builder.writeIndex(OutputStream))
@@ -913,9 +913,8 @@ GlobalModuleIndex::writeIndex(FileManager &FileMgr,
"failed writing index");
}
- return llvm::writeFileAtomically(
- (IndexPath + "-%%%%%%%%").str(), IndexPath,
- llvm::StringRef(OutputBuffer.data(), OutputBuffer.size()));
+ return llvm::writeFileAtomically((IndexPath + "-%%%%%%%%").str(), IndexPath,
+ OutputBuffer);
}
namespace {