This is an archive of the discontinued LLVM Phabricator instance.

[clang] remove dead code after 2a1332245fc
ClosedPublic

Authored by thakis on Apr 28 2021, 7:23 AM.

Details

Summary

Commit 2a1332245fc extracted this code to a new function checkSectionName() and
added a call to it, but didn't remove the original code. The original code
is dead since the checkSectionName() early return would fire when it would
trigger. (If it weren't dead, it'd make clang crash since
err_attribute_section_invalid_for_target now takes two args instead of just the
one that's passed.)

No behavior change.

Diff Detail

Event Timeline

thakis created this revision.Apr 28 2021, 7:23 AM
thakis requested review of this revision.Apr 28 2021, 7:23 AM
hans accepted this revision.Apr 28 2021, 7:26 AM

lgtm

The real question is how did you find this? :)

This revision is now accepted and ready to land.Apr 28 2021, 7:26 AM
This revision was landed with ongoing or failed builds.Apr 28 2021, 7:27 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2021, 7:27 AM

The real question is how did you find this? :)

No exciting answer, I'm afraid: I just happened to read this code while looking at something else.