tblah wrote:

Thanks for the review.

> In general, we should only be forwarding the non-default option, not both. If 
> the default changes in the frontend, the driver should be modified to 
> accommodate this.

I wonder if my mistake here could be a reason to change the policy. It is not 
obvious that after changing a default value in a configuration structure, one 
then has to change code handling flags in an entirely different subproject. 
Then the failure mode when such a change is forgotten is particularly bad - in 
this case the negative flag was silently ignored. I think in future new options 
should follow the structure I use here: if any flag is given: forward the last 
one unconditionally, without encoding the default in two places. That will be 
easier to maintain.

https://github.com/llvm/llvm-project/pull/217266
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to