blob: 4542563717a11ccbd06308830e0f5a927066a2dc [file] [log] [blame]
Douglas Gregorb68e3992010-12-21 19:47:46 +00001// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
2
3// PR8839
4extern "C" char memmove();
5
6int main() {
7 // CHECK: call signext i8 @memmove()
8 return memmove();
9}
Douglas Gregor1ddc9c42011-09-06 21:41:04 +000010
11// <rdar://problem/10063539>
12
13template<int (*Compare)(const char *s1, const char *s2)>
14int equal(const char *s1, const char *s2) {
15 return Compare(s1, s2) == 0;
16}
17
18// CHECK: define weak_odr i32 @_Z5equalIXadL_Z16__builtin_strcmpPKcS1_EEEiS1_S1_
19// CHECK: call i32 @strcmp
20template int equal<&__builtin_strcmp>(const char*, const char*);
21