This is an archive of the discontinued LLVM Phabricator instance.

Do not enable RTTI with -fexceptions, for PS4
ClosedPublic

Authored by Sunil_Srivastava on May 16 2018, 3:25 PM.

Details

Summary

NFC for targets other than PS4.

This patch is a change in behavior for PS4, in that PS4 will no longer enable
RTTI when -fexceptions is specified (RTTI and Exceptions are disabled by default
on PS4). RTTI will remain disabled except for types being thrown or caught.
Also, '-fexceptions -fno-rtti' (previously prohibited on PS4) is now accepted,
as it is for other targets.

This patch removes some PS4 specific code, making the code cleaner.

Also, in the test file rtti-options.cpp, PS4 tests where the behavior is the
same as the generic x86_64-linux are removed, making the test cleaner.

Diff Detail

Repository
rL LLVM

Event Timeline

probinson accepted this revision.May 18 2018, 10:39 AM

So on PS4, -fsanitize=vptr without an explicit -frtti will warn and disable the sanitizer, rather than implicitly enabling RTTI. As well as exceptions no longer implicitly enabling full RTTI.
In short, we never implicitly enable RTTI, which was the intention.

LGTM.

This revision is now accepted and ready to land.May 18 2018, 10:39 AM
This revision was automatically updated to reflect the committed changes.