================ @@ -5958,6 +5968,58 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, RenderFloatingPointOptions(TC, D, OFastEnabled, Args, CmdArgs, JA); + if (Arg *AtomicArg = Args.getLastArg(options::OPT_fatomic_EQ)) { ---------------- yxsamliu wrote:
Refactored the code by moving the parsing and validation of the -fatomic= options into a separate helper function. About round-trip processing, the helper function simply reuses the original argument string (via Args.MakeArgString(AtomicArg->getAsString(Args))). This guarantees that the options round-trip correctly through the Render phase without alteration. The atomic lowering options require per-key parsing, duplicate detection, and value validation because we want to allow a single flag to control multiple aspects (namely, no_remote_memory, no_fine_grained_memory, and ignore_denormal_mode). While it might seem complicated at first glance, this design offers significant flexibility and consistency. Alternative approaches such as using separate flags for each option would fragment the interface and could complicate both user documentation and the round-trip (rendering) of these options through the driver. https://github.com/llvm/llvm-project/pull/114841 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits