This is an archive of the discontinued LLVM Phabricator instance.

Remove compile time PreserveName switch based on NDEBUG
ClosedPublic

Authored by mehdi_amini on Mar 9 2016, 6:51 PM.

Details

Summary

Following r263086, we are now relying on a flag on the Context to
discard Value names in release builds.

Diff Detail

Event Timeline

mehdi_amini updated this revision to Diff 50224.Mar 9 2016, 6:51 PM
mehdi_amini retitled this revision from to Remove compile time PreserveName switch based on NDEBUG.
mehdi_amini updated this object.
mehdi_amini added a reviewer: chandlerc.
mehdi_amini added a subscriber: cfe-commits.
chandlerc edited edge metadata.Mar 10 2016, 1:55 AM

FYI, I'd lik eto hold off on submitting here until we're on the same page with Philip on the original LLVM review (D17946), but some comments on how this is working are below...

lib/CodeGen/CodeGenAction.cpp
660–663

I'm surprised this isn't a driver-side NDEBUG default flip? Can this still be overridden with a flag?

mehdi_amini added inline comments.Mar 10 2016, 8:16 AM
lib/CodeGen/CodeGenAction.cpp
660–663

It's gonna be next patch: plumbing a cc1 flag somehow. Right now this is minimum patch to maintain existing behavior in clang while adapting to the IRBuilder API in LLVM.

chandlerc added inline comments.Mar 10 2016, 8:18 AM
lib/CodeGen/CodeGenAction.cpp
660–663

Ah, just add a FIXME comment to make it clear that this is a transitional thing and not planned to be the end state?

mehdi_amini edited edge metadata.

Add a FIXME to change the compile time switch to a runtime command line flag

chandlerc accepted this revision.Mar 11 2016, 12:49 AM
chandlerc edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 11 2016, 12:49 AM