[PATCH] D157046: [clang] Abstract away string allocation in command line generation

Ben Langmuir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 3 16:14:59 PDT 2023


benlangmuir accepted this revision.
benlangmuir added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4323
+    GenerateArg(Consumer, OPT_darwin_target_variant_sdk_version_EQ,
+                Opts.DarwinTargetVariantSDKVersion.getAsString());
 }
----------------
Maybe not worth micro optimizing, but I noticed these two are allocating strings unnecessarily if we had an overload for things that can print to a raw_ostream.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157046/new/

https://reviews.llvm.org/D157046



More information about the cfe-commits mailing list