This revision was automatically updated to reflect the committed changes. Closed by commit rL285899: Remove redundant calls to std::string::data() (authored by malcolm.parsons).
Changed prior to commit: https://reviews.llvm.org/D26276?vs=76835&id=76846#toc Repository: rL LLVM https://reviews.llvm.org/D26276 Files: cfe/trunk/lib/Parse/ParseObjc.cpp cfe/trunk/lib/Tooling/Core/Replacement.cpp Index: cfe/trunk/lib/Tooling/Core/Replacement.cpp =================================================================== --- cfe/trunk/lib/Tooling/Core/Replacement.cpp +++ cfe/trunk/lib/Tooling/Core/Replacement.cpp @@ -569,7 +569,7 @@ const std::map<std::string, Replacements> &FileToReplaces) { std::map<std::string, Replacements> Result; for (const auto &Entry : FileToReplaces) { - llvm::SmallString<256> CleanPath(Entry.first.data()); + llvm::SmallString<256> CleanPath(Entry.first); llvm::sys::path::remove_dots(CleanPath, /*remove_dot_dot=*/true); Result[CleanPath.str()] = std::move(Entry.second); } Index: cfe/trunk/lib/Parse/ParseObjc.cpp =================================================================== --- cfe/trunk/lib/Parse/ParseObjc.cpp +++ cfe/trunk/lib/Parse/ParseObjc.cpp @@ -1036,7 +1036,7 @@ case tok::caretequal: { std::string ThisTok(PP.getSpelling(Tok)); if (isLetter(ThisTok[0])) { - IdentifierInfo *II = &PP.getIdentifierTable().get(ThisTok.data()); + IdentifierInfo *II = &PP.getIdentifierTable().get(ThisTok); Tok.setKind(tok::identifier); SelectorLoc = ConsumeToken(); return II;
Index: cfe/trunk/lib/Tooling/Core/Replacement.cpp =================================================================== --- cfe/trunk/lib/Tooling/Core/Replacement.cpp +++ cfe/trunk/lib/Tooling/Core/Replacement.cpp @@ -569,7 +569,7 @@ const std::map<std::string, Replacements> &FileToReplaces) { std::map<std::string, Replacements> Result; for (const auto &Entry : FileToReplaces) { - llvm::SmallString<256> CleanPath(Entry.first.data()); + llvm::SmallString<256> CleanPath(Entry.first); llvm::sys::path::remove_dots(CleanPath, /*remove_dot_dot=*/true); Result[CleanPath.str()] = std::move(Entry.second); } Index: cfe/trunk/lib/Parse/ParseObjc.cpp =================================================================== --- cfe/trunk/lib/Parse/ParseObjc.cpp +++ cfe/trunk/lib/Parse/ParseObjc.cpp @@ -1036,7 +1036,7 @@ case tok::caretequal: { std::string ThisTok(PP.getSpelling(Tok)); if (isLetter(ThisTok[0])) { - IdentifierInfo *II = &PP.getIdentifierTable().get(ThisTok.data()); + IdentifierInfo *II = &PP.getIdentifierTable().get(ThisTok); Tok.setKind(tok::identifier); SelectorLoc = ConsumeToken(); return II;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits