File tree Expand file tree Collapse file tree 2 files changed +29
-6
lines changed
Expand file tree Collapse file tree 2 files changed +29
-6
lines changed Original file line number Diff line number Diff line change 1- // RUN: %clang_cc1 %s -I%S -triple x86_64-unknown-linux-gnu -std=c++98 -O0 -disable-llvm-passes -emit-cir -o %t
1+ // RUN: %clang_cc1 %s -I%S -I%S/../Inputs - triple x86_64-unknown-linux-gnu -std=c++98 -O0 -disable-llvm-passes -emit-cir -o %t
22// RUN: FileCheck -allow-deprecated-dag-overlap --check-prefix=CHECK %s < %t
3- // RUN: %clang_cc1 %s -I%S -triple x86_64-unknown-linux-gnu -std=c++98 -O2 -disable-llvm-passes -emit-cir -o %t.opt
3+ // RUN: %clang_cc1 %s -I%S -I%S/../Inputs - triple x86_64-unknown-linux-gnu -std=c++98 -O2 -disable-llvm-passes -emit-cir -o %t.opt
44// RUN: FileCheck -allow-deprecated-dag-overlap --check-prefix=CHECK-FORCE-EMIT %s < %t.opt
55
6+ #include " typeinfo"
7+
68// CHECK: cir.global{{.*}} external @_ZTV1A
7- // CHECK-FORCE-EMIT: cir.global{{.*}} available_externally @_ZTV1A
9+ // CHECK-FORCE-EMIT-DAG : cir.global{{.*}} available_externally @_ZTV1A
810struct A {
911 A ();
1012 virtual void f ();
@@ -16,9 +18,6 @@ A::A() { }
1618void f (A* a) {
1719 a->f ();
1820};
19-
20- // CHECK-LABEL: cir.func{{.*}} @_Z1gv
21- // CHECK: cir.call @_Z1fP1A
2221void g () {
2322 A a;
2423 f (&a);
Original file line number Diff line number Diff line change 1+ namespace std {
2+ class type_info {
3+ public:
4+ virtual ~type_info();
5+ const char* name() const { return __name; }
6+ bool operator==(const type_info& __arg) const {
7+ return __name == __arg.__name;
8+ }
9+
10+ bool operator!=(const type_info& __arg) const {
11+ return !operator==(__arg);
12+ }
13+
14+ bool before(const type_info& __arg) const {
15+ return __name < __arg.__name;
16+ }
17+
18+ unsigned long hash_code() const {
19+ return reinterpret_cast<unsigned long long>(__name);
20+ }
21+ protected:
22+ const char *__name;
23+ };
24+ }
You can’t perform that action at this time.
0 commit comments