From 6cf4a6ba9b3fb7d0b2eab26c35146b5ab3c3c8be Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 13 Aug 2015 17:56:49 +0000 Subject: 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 --- clang/test/Lexer/has_feature_rtti.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/test/Lexer/has_feature_rtti.cpp') 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(); -- cgit v1.2.3