[PATCH] D52191: Fix logic around determining use of frame pointer with -pg.

Stephen Hines via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 18 11:34:11 PDT 2018


srhines added a comment.

In https://reviews.llvm.org/D52191#1238628, @dblaikie wrote:

> Sure, looks good. Though my other/vague concern is why does this case error about fomit-frame-pointer having no effect, but other things (like using -fomit-frame-pointer on a target that requires frame pointers) that ignore -fomit-frame-pointer don't? Weird. But it probably makes sense somehow.


I think the original issue is that one should not **explicitly** say "omit frame pointers" and "instrument for profiling with mcount". It's possible that there should be other errors for using "omit frame pointers" on targets that require them, but that should be checked independently elsewhere. Do we have many (any) of these kinds of targets? I'm going to submit this patch, but am happy to add a diagnostic later on for the other case, if you think that is worthwhile.


Repository:
  rC Clang

https://reviews.llvm.org/D52191





More information about the cfe-commits mailing list