This is an archive of the discontinued LLVM Phabricator instance.

Emit label names according to -discard-value-names.
ClosedPublic

Authored by EricWF on Feb 1 2018, 4:41 PM.

Details

Summary

Previously, Clang only emitted label names in assert builds.
However there is a CC1 option -discard-value-names that should have been used to control emission instead.

This patch removes the NDEBUG preprocessor block and instead allows LLVM to handle removing the names in accordance with the option.

Diff Detail

Event Timeline

EricWF created this revision.Feb 1 2018, 4:41 PM
aaron.ballman accepted this revision.Feb 2 2018, 7:19 AM

LGTM with a small formatting nit in the test.

test/CodeGenCXX/discard-name-values.cpp
7

Indentation is a bit off here. Actually, it seems off for much of the file -- can you reindent the comments as well?

This revision is now accepted and ready to land.Feb 2 2018, 7:19 AM
EricWF marked an inline comment as done.Feb 2 2018, 11:58 AM
EricWF added inline comments.
test/CodeGenCXX/discard-name-values.cpp
7

Ack. Clang-format to the rescue!

EricWF updated this revision to Diff 132648.Feb 2 2018, 11:58 AM
EricWF marked an inline comment as done.
  • Address inline comments.
This revision was automatically updated to reflect the committed changes.