aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Serialization/ASTWriter.h2
-rw-r--r--lib/Serialization/ASTWriter.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/Serialization/ASTWriter.h b/include/clang/Serialization/ASTWriter.h
index b8bff27f57..426fc47801 100644
--- a/include/clang/Serialization/ASTWriter.h
+++ b/include/clang/Serialization/ASTWriter.h
@@ -424,7 +424,7 @@ public:
unsigned NumBaseOrMembers, RecordData &Record);
/// \brief Add a string to the given record.
- void AddString(const std::string &Str, RecordData &Record);
+ void AddString(llvm::StringRef Str, RecordData &Record);
/// \brief Mark a namespace as needing an update.
void AddUpdatedNamespace(const NamespaceDecl *NS) {
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp
index efc7da7f28..3b6b218e74 100644
--- a/lib/Serialization/ASTWriter.cpp
+++ b/lib/Serialization/ASTWriter.cpp
@@ -2165,7 +2165,7 @@ void ASTWriter::WriteAttributeRecord(const AttrVec &Attrs) {
Stream.EmitRecord(DECL_ATTR, Record);
}
-void ASTWriter::AddString(const std::string &Str, RecordData &Record) {
+void ASTWriter::AddString(llvm::StringRef Str, RecordData &Record) {
Record.push_back(Str.size());
Record.insert(Record.end(), Str.begin(), Str.end());
}