summaryrefslogtreecommitdiffstats
path: root/clang/test/Lexer/has_feature_rtti.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2015-08-13 17:56:49 +0000
committerReid Kleckner <rnk@google.com>2015-08-13 17:56:49 +0000
commit6cf4a6ba9b3fb7d0b2eab26c35146b5ab3c3c8be (patch)
tree13c5628c358bf2544f879b56834a82099e3f4a82 /clang/test/Lexer/has_feature_rtti.cpp
parent1c39ca6501a5c9259a166a03fceb049d886cbea4 (diff)
downloadbcm5719-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/test/Lexer/has_feature_rtti.cpp')
-rw-r--r--clang/test/Lexer/has_feature_rtti.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/Lexer/has_feature_rtti.cpp b/clang/test/Lexer/has_feature_rtti.cpp
index 4bfeead3299..26eaa2ead62 100644
--- a/clang/test/Lexer/has_feature_rtti.cpp
+++ b/clang/test/Lexer/has_feature_rtti.cpp
@@ -1,5 +1,6 @@
// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-RTTI %s
// RUN: %clang_cc1 -E -fno-rtti %s -o - | FileCheck --check-prefix=CHECK-NO-RTTI %s
+// RUN: %clang_cc1 -E -fno-rtti-data %s -o - | FileCheck --check-prefix=CHECK-NO-RTTI %s
#if __has_feature(cxx_rtti)
int foo();
OpenPOWER on IntegriCloud