Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / preserve-call-conv.c
blob65973206403f707ab2a5a8029f403ff95a480ff9
1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm < %s | FileCheck %s --check-prefixes=CHECK,LINUX
2 // RUN: %clang_cc1 -triple arm64-unknown-unknown -emit-llvm < %s | FileCheck %s --check-prefixes=CHECK,LINUX
4 // RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -emit-llvm %s -o - | FileCheck %s
5 // RUN: %clang_cc1 -triple aarch64-unknown-windows-msvc -emit-llvm %s -o - | FileCheck %s
6 // RUN: %clang_cc1 -triple thumbv7-unknown-windows-msvc -emit-llvm %s -o - | FileCheck %s
8 // Check that the preserve_most calling convention attribute at the source level
9 // is lowered to the corresponding calling convention attrribute at the LLVM IR
10 // level.
11 void foo(void) __attribute__((preserve_most)) {
12 // CHECK-LABEL: define {{(dso_local )?}}preserve_mostcc void @foo()
15 // Check that the preserve_most calling convention attribute at the source level
16 // is lowered to the corresponding calling convention attrribute at the LLVM IR
17 // level.
18 void boo(void) __attribute__((preserve_all)) {
19 // CHECK-LABEL: define {{(dso_local )?}}preserve_allcc void @boo()
22 // Check that the preserve_none calling convention attribute at the source level
23 // is lowered to the corresponding calling convention attrribute at the LLVM IR
24 // level.
25 void bar(void) __attribute__((preserve_none)) {
26 // LINUX-LABEL: define {{(dso_local )?}}preserve_nonecc void @bar()