tabloid.adroit marked 2 inline comments as done. tabloid.adroit added inline comments.
================ Comment at: lib/Driver/ToolChains/Clang.cpp:576-579 + Arg *FP = Args.getLastArg(options::OPT_fno_omit_frame_pointer, + options::OPT_fomit_frame_pointer); + Arg *LeafFP = Args.getLastArg(options::OPT_mno_omit_leaf_frame_pointer, + options::OPT_momit_leaf_frame_pointer); ---------------- chandlerc wrote: > This still doesn't make sense to me... > > If the user specifies `-fomit-frame-point` or `-fno-omit-frame-pointer` > *after* `-momit-leaf-frame-pointer` or `-mno-omit-leaf-frame-pointer`, then > that last flag should win... > > I think you need to first get the "base" FP state by checking the main two > flags. Then you need to get the "last" FP state by checking *all four flags*. > When the last flag is a leaf flag, then the state is determined by the base + > the last. When the last flag is not one of the leaf flags, then the last flag > fully specifies the result. > > I think you can also process these variables into something simpler to test > below, essentially handling all the matching logic in one place. I see the point here. I didn't do it since it deviates from GCC/intel compiler behavior. Could you please confirm we really want that? One example from here is : ` -momit-leaf-frame-pointer -fno-omit-frame-pointer` (https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-momit-leaf-frame-pointer) For GCC/intel, this is frame-pointer=non-leaf, for us, it will be frame-pointer=all Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56353/new/ https://reviews.llvm.org/D56353 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits