Skip to content

Commit e205202

Browse files
arichardsongithub-actions[bot]
authored andcommitted
Automerge: [update_cc_test_checks] Add test for missing handling of mangled names
We are missing MSVC C++ functions since the name is quoted in the LLVM IR, so we don't find them in the generated IR and therefore don't add the test checks. Additionally, there is an issue with finding functions using NEON types (see llvm/llvm-project#121800). Pull Request: llvm/llvm-project#121976
2 parents 97ff2a3 + 94c0db0 commit e205202

File tree

5 files changed

+623
-43
lines changed

5 files changed

+623
-43
lines changed

clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --include-generated-funcs --version 5
12
// Basic C++ test for update_cc_test_checks
23
// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
4+
// RUN: %clang_cc1 -triple=x86_64-apple-macho -emit-llvm -o - %s | FileCheck %s --check-prefix=MACHO
5+
// RUN: %clang_cc1 -triple=x86_64-windows-msvc -emit-llvm -o - %s | FileCheck %s --check-prefix=MSVC
6+
// RUN: %clang_cc1 -triple=x86_64-windows-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=MINGW
37

48
class Foo {
59
int x;
@@ -13,6 +17,8 @@ class Foo {
1317
inline int function_defined_out_of_line(int arg) const;
1418
};
1519

20+
[[clang::noinline]] static int static_noinline_fn(int arg) { return arg; }
21+
1622
Foo::Foo(int x) : x(x) {}
1723
Foo::~Foo() {}
1824
int Foo::function_defined_out_of_line(int arg) const { return x - arg; }
@@ -22,4 +28,5 @@ int main() {
2228
Foo f(1);
2329
f.function_defined_inline(2);
2430
f.function_defined_out_of_line(3);
31+
return static_noinline_fn(0);
2532
}

0 commit comments

Comments
 (0)