summaryrefslogtreecommitdiff
path: root/clang/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp')
-rw-r--r--clang/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp b/clang/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp
index ed3f4bd6ef6c..15671a99a3fc 100644
--- a/clang/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp
+++ b/clang/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp
@@ -54,7 +54,7 @@ void clang::EmitClangCommentHTMLNamedCharacterReferences(RecordKeeper &Records,
for (std::vector<Record *>::iterator I = Tags.begin(), E = Tags.end();
I != E; ++I) {
Record &Tag = **I;
- std::string Spelling = Tag.getValueAsString("Spelling");
+ std::string Spelling = std::string(Tag.getValueAsString("Spelling"));
uint64_t CodePoint = Tag.getValueAsInt("CodePoint");
CLiteral.clear();
CLiteral.append("return ");
@@ -66,7 +66,7 @@ void clang::EmitClangCommentHTMLNamedCharacterReferences(RecordKeeper &Records,
}
CLiteral.append(";");
- StringMatcher::StringPair Match(Spelling, CLiteral.str());
+ StringMatcher::StringPair Match(Spelling, std::string(CLiteral.str()));
NameToUTF8.push_back(Match);
}