Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / inline-builtin-asm-name.c
blob969174f7ac0d2ac2769c322e7e286086b8644971
1 // RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -o - %s -disable-llvm-optzns | FileCheck %s
3 // CHECK: call i32 @"\01_asm_func_name.inline"
5 // CHECK: declare dso_local i32 @"\01_asm_func_name"(ptr noundef, i32 noundef, ptr noundef, ptr noundef)
7 // CHECK: define internal i32 @"\01_asm_func_name.inline"
9 // CHECK: call i32 @__mingw_vsnprintf
11 // CHECK: declare dso_local i32 @__mingw_vsnprintf
13 typedef unsigned int size_t;
15 int __mingw_vsnprintf(char *_DstBuf, size_t _MaxCount, const char *_Format, __builtin_va_list _ArgList);
17 // For the real use case, "_asm_func_name" is actually "___mingw_vsnprintf", but it's renamed in the testcase for disambiguation.
18 int vsnprintf(char *__stream, size_t __n, const char *__format, __builtin_va_list __local_argv) __asm__("_asm_func_name");
20 extern __inline__ __attribute__((__always_inline__, __gnu_inline__))
21 int vsnprintf(char *__stream, size_t __n, const char *__format, __builtin_va_list __local_argv)
23 return __mingw_vsnprintf(__stream, __n, __format, __local_argv);
26 void call(const char* fmt, ...) {
27 char buf[200];
28 __builtin_va_list ap;
29 __builtin_va_start(ap, fmt);
30 vsnprintf(buf, sizeof(buf), fmt, ap);
31 __builtin_va_end(ap);