lebedev.ri added inline comments.
================
Comment at: lib/Frontend/FrontendActions.cpp:779
+ {
+ std::string Str;
+#define FEATURE(Name, Predicate)
\
----------------
This is likely to do an allocation for each feature.
Maybe consider `llvm::SmallString<64>`
================
Comment at: lib/Frontend/FrontendActions.cpp:781
+#define FEATURE(Name, Predicate)
\
+ Str += "\t{\"" #Name "\" : " + std::string(Predicate ? "true" : "false") +
\
+ "},\n";
----------------
Similarly, you may want to explicitly use `llvm::Twine` here
================
Comment at: lib/Frontend/FrontendActions.cpp:791
+
+ OS << "\n\"extensions\" : [\n";
+ {
----------------
same
https://reviews.llvm.org/D45835
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits