brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · b6f046e Raw
33 lines · c
1// RUN: %clang_cc1 -triple x86_64 -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s2//3// Verifies that clang-generated *.inline carry the same name at call and callee4// site, in spite of asm labels.5 6typedef struct _IO_FILE FILE;7extern FILE *stdout;8extern int vprintf (const char *__restrict __format, __builtin_va_list __arg);9extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,10      const char *__restrict __format, __builtin_va_list __ap);11extern int __vprintf_chk (int __flag, const char *__restrict __format,12     __builtin_va_list __ap);13 14extern __typeof (vprintf) vprintf __asm ("__vprintfieee128");15extern __typeof (__vfprintf_chk) __vfprintf_chk __asm ("__vfprintf_chkieee128");16extern __typeof (__vprintf_chk) __vprintf_chk __asm ("__vprintf_chkieee128");17 18extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int19vprintf (const char *__restrict __fmt, __builtin_va_list __ap)20{21  return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap);22}23 24void test(const char *fmt, __builtin_va_list ap) {25  vprintf(fmt, ap);26}27 28// CHECK-LABEL: void @test(29// CHECK: call i32 @__vprintfieee128.inline(30//31// CHECK-LABEL: internal i32 @__vprintfieee128.inline(32// CHECK: call i32 @__vfprintf_chkieee128(33