This is an archive of the discontinued LLVM Phabricator instance.

clang: Don't warn on unused momit-leaf-frame-pointer when frame pointers are off.
ClosedPublic

Authored by thakis on Aug 13 2019, 7:50 AM.

Details

Summary

This fixes a regression from r365860: As that commit message
states, there are 3 valid states targeted by the combination of
-f(no-)omit-frame-pointer and -m(no-)omit-leaf-frame-pointer.

After r365860 it's impossible to get from state 10 (omit just
leaf frame pointers) to state 11 (omit all frame pointers)
in a single command line without getting a warning.

This change restores that functionality.

Fixes PR42966.

Diff Detail

Repository
rL LLVM

Event Timeline

thakis created this revision.Aug 13 2019, 7:50 AM
thakis edited the summary of this revision. (Show Details)Aug 13 2019, 7:54 AM
hans accepted this revision.Aug 13 2019, 8:58 AM

lgtm

clang/test/Driver/frame-pointer-elim.c
1 ↗(On Diff #214837)

This is the first time I've seen the CHECK lines come before the FileCheck invocations. That's not due to this patch of course, but maybe they could be moved in a follow-up?

31 ↗(On Diff #214837)

-fno-no?

This revision is now accepted and ready to land.Aug 13 2019, 8:58 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 13 2019, 10:36 AM

LGTM

cfe/trunk/test/Driver/frame-pointer-elim.c
31

Omitted -