diff options
Diffstat (limited to 'clang/utils')
| -rw-r--r-- | clang/utils/TableGen/ClangAttrEmitter.cpp | 7 | ||||
| -rw-r--r-- | clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp | 2 | ||||
| -rw-r--r-- | clang/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp | 3 | ||||
| -rw-r--r-- | clang/utils/TableGen/NeonEmitter.cpp | 4 |
4 files changed, 7 insertions, 9 deletions
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp index e6c6d85acd6..11a766c7a4e 100644 --- a/clang/utils/TableGen/ClangAttrEmitter.cpp +++ b/clang/utils/TableGen/ClangAttrEmitter.cpp @@ -64,10 +64,9 @@ GetFlattenedSpellings(const Record &Attr) { for (const auto &Spelling : Spellings) { if (Spelling->getValueAsString("Variety") == "GCC") { // Gin up two new spelling objects to add into the list. - Ret.push_back(FlattenedSpelling("GNU", Spelling->getValueAsString("Name"), - "", true)); - Ret.push_back(FlattenedSpelling( - "CXX11", Spelling->getValueAsString("Name"), "gnu", true)); + Ret.emplace_back("GNU", Spelling->getValueAsString("Name"), "", true); + Ret.emplace_back("CXX11", Spelling->getValueAsString("Name"), "gnu", + true); } else Ret.push_back(FlattenedSpelling(*Spelling)); } diff --git a/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp b/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp index 857b22e2f0b..3349030466f 100644 --- a/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp +++ b/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp @@ -66,7 +66,7 @@ void EmitClangCommentCommandInfo(RecordKeeper &Records, raw_ostream &OS) { std::string Name = Tag.getValueAsString("Name"); std::string Return; raw_string_ostream(Return) << "return &Commands[" << i << "];"; - Matches.push_back(StringMatcher::StringPair(Name, Return)); + Matches.emplace_back(std::move(Name), std::move(Return)); } OS << "const CommandInfo *CommandTraits::getBuiltinCommandInfo(\n" diff --git a/clang/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp b/clang/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp index 22c6226cfeb..477bbc8aaa5 100644 --- a/clang/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp +++ b/clang/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp @@ -24,8 +24,7 @@ void clang::EmitClangCommentHTMLTags(RecordKeeper &Records, raw_ostream &OS) { std::vector<Record *> Tags = Records.getAllDerivedDefinitions("Tag"); std::vector<StringMatcher::StringPair> Matches; for (Record *Tag : Tags) { - std::string Spelling = Tag->getValueAsString("Spelling"); - Matches.push_back(StringMatcher::StringPair(Spelling, "return true;")); + Matches.emplace_back(Tag->getValueAsString("Spelling"), "return true;"); } emitSourceFileHeader("HTML tag name matcher", OS); diff --git a/clang/utils/TableGen/NeonEmitter.cpp b/clang/utils/TableGen/NeonEmitter.cpp index e039ae59560..b9871ebbb25 100644 --- a/clang/utils/TableGen/NeonEmitter.cpp +++ b/clang/utils/TableGen/NeonEmitter.cpp @@ -337,9 +337,9 @@ public: // Modify the TypeSpec per-argument to get a concrete Type, and create // known variables for each. // Types[0] is the return value. - Types.push_back(Type(OutTS, Proto[0])); + Types.emplace_back(OutTS, Proto[0]); for (unsigned I = 1; I < Proto.size(); ++I) - Types.push_back(Type(InTS, Proto[I])); + Types.emplace_back(InTS, Proto[I]); } /// Get the Record that this intrinsic is based off. |

