1 // RUN: %clang_cc1 -triple=i386-pc-solaris2.11 -w -emit-llvm %s -o - | FileCheck %s
7 #pragma redefine_extname statvfs64 statvfs
8 int statvfs64(struct statvfs64
*);
14 // Check that even if there is a structure with redefined name before the
15 // pragma, subsequent function name redefined properly. PR5172, Comment 11.
16 // CHECK: call i32 @statvfs(ptr noundef %st)
19 // This is a case when redefenition is deferred *and* we have a local of the
20 // same name. PR23923.
21 #pragma redefine_extname foo bar
27 int foo() { return 1; }
28 // CHECK: define{{.*}} i32 @bar()
31 // Check that #pragma redefine_extname applies to C code only, and shouldn't be
33 #pragma redefine_extname foo_cpp bar_cpp
34 extern int foo_cpp() { return 1; }
35 // CHECK-NOT: define{{.*}} i32 @bar_cpp()