Page MenuHomePhabricator

Constant strings emitted when `-fno-constant-cfstrings` is passed should allow dead stripping
Needs ReviewPublic

Authored by bendjones on Nov 14 2019, 5:44 PM.

Details

Summary

Part of rdar://56643852 that makes all possible constant string code paths emit without no_dead_strip so that dead stripping is allowed.

Diff Detail

Event Timeline

bendjones created this revision.Nov 14 2019, 5:44 PM
bendjones created this object with edit policy "Administrators".

The code looks right, but can you add a test for this in CodeGenObjC? Also, when you re-upload the patch with the tests, please use -U9999999 to provide full context in the diff.

The code looks right, but can you add a test for this in CodeGenObjC? Also, when you re-upload the patch with the tests, please use -U9999999 to provide full context in the diff.

Will do

bendjones updated this revision to Diff 229441.Nov 14 2019, 8:45 PM

Added "objc_arc_inert" and updated clang/test/CodeGenObjC/ns-constant-strings.m tests to make sure the section is emitted as we want.

For some reason this revision is locked down and I'm not allowed to "edit" it, which includes adding inline review comments. Can you add me as a reviewer?

The two comments:

  • Please add a period at the end of the sentence in the comment.
  • Can you give more context about what objc_arc_inert is doing, and why it's necessary now that no_dead_strip is gone?

For some reason this revision is locked down and I'm not allowed to "edit" it, which includes adding inline review comments. Can you add me as a reviewer?

Thought I did.

The two comments:

  • Please add a period at the end of the sentence in the comment.

Will do.

  • Can you give more context about what objc_arc_inert is doing, and why it's necessary now that no_dead_strip is gone?

The objc_arc_inert was added to other similar things so in the spirt of making things match I added it here. I can keep it simple though.