brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 58fedde Raw
49 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py2/// Check that we generate checks for functions even though the mangledName3/// property in the AST dump JSON does not match the LLVM IR name.4// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=ELF5// RUN: %clang_cc1 -triple=x86_64-apple-macho -emit-llvm -o - %s | FileCheck %s --check-prefix=MACHO6// RUN: %clang_cc1 -triple=x86_64-windows-msvc -emit-llvm -o - %s | FileCheck %s --check-prefix=MSVC7// RUN: %clang_cc1 -triple=x86_64-windows-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=MINGW8// RUN: %clang_cc1 -triple=i686-unknown-win32 -emit-llvm -o - %s | FileCheck %s --check-prefix=WIN329// RUN: %clang_cc1 -triple thumbv7s-apple-darwin -target-abi apcs-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=THUMB-DARWIN10 11// UTC_ARGS: --disable12// ELF: target datalayout = "e-m:e-13// MACHO: target datalayout = "e-m:o-14// MSVC: target datalayout = "e-m:w-15// MINGW: target datalayout = "e-m:w-16// WIN32: target datalayout = "e-m:x-17// THUMB-DARWIN: target datalayout = "e-m:o-18// UTC_ARGS: --enable19 20#ifdef __arm__21typedef __attribute__((neon_vector_type(8))) __INT8_TYPE__ int8x8_t;22int8x8_t test_vaba_s8(int8x8_t a, int8x8_t b, int8x8_t c) {23  return a + b + c;24}25#endif26 27/// Check global variable mangling28[[gnu::used]] static int i1 = 1;29int i2 = 2;30 31[[clang::noinline,gnu::used]] static int static_noinline_fn(int arg) { return arg; }32 33[[gnu::visibility("hidden")]] int hidden_visibility(int arg) { return arg; }34 35#ifdef __ELF__36[[gnu::visibility("protected")]] int protected_visibility(int arg) { return arg; }37#endif38 39[[gnu::visibility("default")]] int default_visibility(int arg) { return arg; }40 41int no_visibility(int arg) { return arg; }42 43 44/// FIXME: the i386 @fastcall@12 is not being checked here45#ifdef _WIN3246int __fastcall fastcall(int arg, long arg2, long arg3) { return arg; }47#endif48 49