[PATCH] D157046: [clang] Abstract away string allocation in command line generation
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 3 20:39:29 PDT 2023
jansvoboda11 added inline comments.
================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4323
+ GenerateArg(Consumer, OPT_darwin_target_variant_sdk_version_EQ,
+ Opts.DarwinTargetVariantSDKVersion.getAsString());
}
----------------
benlangmuir wrote:
> 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.
Interesting, there are a couple of other instances where this might help. I probably won't be spending time on this right now, but good to be aware.
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