brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 6597320 Raw
28 lines · c
1// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm < %s | FileCheck %s --check-prefixes=CHECK,LINUX2// RUN: %clang_cc1 -triple arm64-unknown-unknown -emit-llvm < %s | FileCheck %s --check-prefixes=CHECK,LINUX3 4// RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -emit-llvm %s -o - | FileCheck %s5// RUN: %clang_cc1 -triple aarch64-unknown-windows-msvc -emit-llvm %s -o - | FileCheck %s6// RUN: %clang_cc1 -triple thumbv7-unknown-windows-msvc -emit-llvm %s -o - | FileCheck %s7 8// Check that the preserve_most calling convention attribute at the source level9// is lowered to the corresponding calling convention attrribute at the LLVM IR10// level.11void foo(void) __attribute__((preserve_most)) {12  // CHECK-LABEL: define {{(dso_local )?}}preserve_mostcc void @foo()13}14 15// Check that the preserve_most calling convention attribute at the source level16// is lowered to the corresponding calling convention attrribute at the LLVM IR17// level.18void boo(void) __attribute__((preserve_all)) {19  // CHECK-LABEL: define {{(dso_local )?}}preserve_allcc void @boo()20}21 22// Check that the preserve_none calling convention attribute at the source level23// is lowered to the corresponding calling convention attrribute at the LLVM IR24// level.25void bar(void) __attribute__((preserve_none)) {26  // LINUX-LABEL: define {{(dso_local )?}}preserve_nonecc void @bar()27}28