2011-12-20 00:30:30 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm %s -o - | FileCheck %s
|
2011-10-27 04:41:06 +08:00
|
|
|
|
2011-10-29 04:43:56 +08:00
|
|
|
extern void foo_alias (void) __asm ("foo");
|
|
|
|
inline void foo (void) {
|
2011-10-27 04:41:06 +08:00
|
|
|
return foo_alias ();
|
|
|
|
}
|
2011-10-29 04:43:56 +08:00
|
|
|
extern void bar_alias (void) __asm ("bar");
|
|
|
|
inline __attribute__ ((__always_inline__)) void bar (void) {
|
|
|
|
return bar_alias ();
|
2011-10-27 04:41:06 +08:00
|
|
|
}
|
2011-12-19 22:41:01 +08:00
|
|
|
extern char *strrchr_foo (const char *__s, int __c) __asm ("strrchr");
|
|
|
|
extern inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * strrchr_foo (const char *__s, int __c) {
|
|
|
|
return __builtin_strrchr (__s, __c);
|
|
|
|
}
|
2011-10-29 04:43:56 +08:00
|
|
|
void f(void) {
|
|
|
|
foo();
|
|
|
|
bar();
|
2011-12-19 22:41:01 +08:00
|
|
|
strrchr_foo("", '.');
|
2011-10-29 04:43:56 +08:00
|
|
|
}
|
|
|
|
|
2013-08-15 14:47:53 +08:00
|
|
|
// CHECK-LABEL: define void @f()
|
2011-10-29 04:52:18 +08:00
|
|
|
// CHECK: call void @foo()
|
2011-10-29 04:43:56 +08:00
|
|
|
// CHECK-NEXT: call void @bar()
|
2011-12-19 22:41:01 +08:00
|
|
|
// CHECK-NEXT: call i8* @strrchr(
|
2011-10-29 04:43:56 +08:00
|
|
|
// CHECK-NEXT: ret void
|
2011-10-27 04:41:06 +08:00
|
|
|
|
2011-10-29 04:43:56 +08:00
|
|
|
// CHECK: declare void @foo()
|
|
|
|
// CHECK: declare void @bar()
|
2011-12-19 22:41:01 +08:00
|
|
|
// CHECK: declare i8* @strrchr(i8*, i32)
|