This is an archive of the discontinued LLVM Phabricator instance.

Compile out all pretty stack trace support when LLVM is built without support for backtraces.
ClosedPublic

Authored by resistor on Jan 28 2015, 10:04 PM.

Details

Reviewers
chandlerc
Summary

This change uses the existing build configuration parameter ENABLE_BACKTRACE to compile out all pretty stack trace support when backtraces are disabled.

This has the nice secondary effect of allowing LLVM to continue to build for targets without __thread or thread_local support to continue to work so long as they build without support for backtraces.

Diff Detail

Event Timeline

resistor updated this revision to Diff 18938.Jan 28 2015, 10:04 PM
resistor retitled this revision from to Compile out all pretty stack trace support when LLVM is built without support for backtraces..
resistor updated this object.
resistor edited the test plan for this revision. (Show Details)
resistor added a reviewer: chandlerc.
resistor added a subscriber: Unknown Object (MLST).
chandlerc accepted this revision.Jan 28 2015, 10:52 PM
chandlerc edited edge metadata.

This patch seems fine, feel free to submit. Some nits below on the code.

For future reference to anyone who looks up the code review down the road though, I'm not really endorsing us restricting raw TLS to optional components. But there is no reason to force sorting that out in the general case today.

lib/Support/PrettyStackTrace.cpp
35

Start this before the big comment block and give it its own comment indicating that this is used to avoid using thread locals where possible?

159–161

No real need for these, although no harm.

This revision is now accepted and ready to land.Jan 28 2015, 10:52 PM

r227423

—Owen

resistor closed this revision.Jan 30 2015, 10:54 AM