This is an archive of the discontinued LLVM Phabricator instance.

clang: Don't emit "frame-pointer"="none"
ClosedPublic

Authored by arsenm on Dec 7 2022, 11:14 AM.

Details

Summary

This is the default behavior and cuts down on attribute spam.
Probably should also do something to consolidate the option spellings;
printing and parsing it is repeated in at least 3 different places.

In the OpenMP tests, I had to manually delete some metadata check
lines update_cc_test_checks was inserting that included the local
build revision.

Diff Detail

Event Timeline

arsenm created this revision.Dec 7 2022, 11:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 7 2022, 11:14 AM
arsenm requested review of this revision.Dec 7 2022, 11:14 AM

Adding codegen code owners in for awareness, but in general I think this is a good cleanup. Thank you! Assuming the bots are happy, this LGTM, but please give the codegen folks a chance to speak up before landing.

clang/include/clang/Basic/CodeGenOptions.h
140

Despite this being a fully covered switch, I will not be surprised if one of the MSVC builders gives you a diagnostic about not all paths through the function returning a value (you may need to add an llvm_unreachable after the switch to fix that).

arsenm updated this revision to Diff 483964.Dec 19 2022, 7:34 AM

Add unreachable

Seems fine.

rjmccall accepted this revision.Jan 3 2023, 2:26 PM
This revision is now accepted and ready to land.Jan 3 2023, 2:26 PM