This adds -no-opaque-pointers to clang tests whose output will change when opaque pointers are enabled by default. This is intended to be part of the migration approach described in https://discourse.llvm.org/t/enabling-opaque-pointers-by-default/61322/9. The patch has been produced by replacing %clang_cc1 with %clang_cc1 -no-opaque-pointers for tests that fail with opaque pointers enabled. Worth noting that this doesn't cover all tests, there's a remaining ~40 tests not using %clang_cc1 that will need a followup change. Differential Revision: https://reviews.llvm.org/D123115
26 lines
868 B
C++
26 lines
868 B
C++
// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-pc-windows-gnu -emit-llvm -o - | FileCheck %s
|
|
|
|
namespace std { class type_info; }
|
|
extern void use(const std::type_info &rtti);
|
|
|
|
struct Test1a {
|
|
Test1a();
|
|
virtual void foo();
|
|
virtual void bar();
|
|
};
|
|
|
|
// V-table needs to be defined weakly.
|
|
Test1a::Test1a() { use(typeid(Test1a)); }
|
|
// This defines the key function.
|
|
inline void Test1a::foo() {}
|
|
|
|
// CHECK: $_ZTV6Test1a = comdat any
|
|
// CHECK: $_ZTS6Test1a = comdat any
|
|
// CHECK: $_ZTI6Test1a = comdat any
|
|
// CHECK-NOT: $_ZTS6Test1a.1 = comdat any
|
|
// CHECK-NOT: $_ZTI6Test1a.1 = comdat any
|
|
|
|
// CHECK: @_ZTV6Test1a = linkonce_odr dso_local unnamed_addr constant {{.*}} ({ i8*, i8* }* @_ZTI6Test1a to i8*)
|
|
// CHECK: @_ZTS6Test1a = linkonce_odr dso_local constant
|
|
// CHECK: @_ZTI6Test1a = linkonce_odr dso_local constant {{.*}} [8 x i8]* @_ZTS6Test1a
|