diff options
author | Reid Kleckner <rnk@google.com> | 2015-08-13 17:56:49 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2015-08-13 17:56:49 +0000 |
commit | 6cf4a6ba9b3fb7d0b2eab26c35146b5ab3c3c8be (patch) | |
tree | 13c5628c358bf2544f879b56834a82099e3f4a82 /clang/lib/Lex/PPMacroExpansion.cpp | |
parent | 1c39ca6501a5c9259a166a03fceb049d886cbea4 (diff) | |
download | bcm5719-llvm-6cf4a6ba9b3fb7d0b2eab26c35146b5ab3c3c8be.tar.gz bcm5719-llvm-6cf4a6ba9b3fb7d0b2eab26c35146b5ab3c3c8be.zip |
Turn off __has_feature(cxx_rtti) when -fno-rtti-data is present
-fno-rtti-data makes it so that vtables emitted in the current TU lack
RTTI data. This means that dynamic_cast usually fails at runtime. Users
of the existing cxx_rtti feature expect all of RTTI to work, not just
some of it.
Chromium bug for context: http://crbug.com/518191
llvm-svn: 244922
Diffstat (limited to 'clang/lib/Lex/PPMacroExpansion.cpp')
-rw-r--r-- | clang/lib/Lex/PPMacroExpansion.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 42b1d048c40..594365b45e1 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -1076,7 +1076,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) { .Case("blocks", LangOpts.Blocks) .Case("c_thread_safety_attributes", true) .Case("cxx_exceptions", LangOpts.CXXExceptions) - .Case("cxx_rtti", LangOpts.RTTI) + .Case("cxx_rtti", LangOpts.RTTI && LangOpts.RTTIData) .Case("enumerator_attributes", true) .Case("nullability", true) .Case("memory_sanitizer", LangOpts.Sanitize.has(SanitizerKind::Memory)) |