annotate clang/test/PCH/dllexport-default-arg-closure.cpp @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 1d019706d866
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // Make sure we emit the MS ABI default ctor closure with PCH.
anatofuz
parents:
diff changeset
2 //
anatofuz
parents:
diff changeset
3 // Test this without pch.
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
4 // RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include %s -emit-llvm -o - %s | FileCheck %s
150
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 // Test with pch.
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
7 // RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -triple x86_64-windows-msvc -std=c++11 -emit-pch -o %t %s
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
8 // RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include-pch %t -emit-llvm -o - %s | FileCheck %s
150
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 #ifndef HEADER
anatofuz
parents:
diff changeset
11 #define HEADER
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 struct __declspec(dllexport) Foo {
anatofuz
parents:
diff changeset
14 enum E { E0 } e;
anatofuz
parents:
diff changeset
15 Foo(E e = E0) : e(e) {}
anatofuz
parents:
diff changeset
16 };
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 // Demangles as:
anatofuz
parents:
diff changeset
19 // void Foo::`default constructor closure'(void)
anatofuz
parents:
diff changeset
20 // CHECK: define weak_odr dso_local dllexport void @"??_FFoo@@QEAAXXZ"(%struct.Foo*{{.*}})
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
21 // CHECK: call noundef %struct.Foo* @"??0Foo@@QEAA@W4E@0@@Z"(%struct.Foo* {{.*}}, i32 noundef 0)
150
anatofuz
parents:
diff changeset
22
anatofuz
parents:
diff changeset
23 #else
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25
anatofuz
parents:
diff changeset
26 #endif