Home | History | Annotate | Download | only in CodeGenCXX
      1 // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
      2 
      3 // PR8839
      4 extern "C" char memmove();
      5 
      6 int main() {
      7   // CHECK: call signext i8 @memmove()
      8   return memmove();
      9 }
     10 
     11 // <rdar://problem/10063539>
     12 
     13 template<int (*Compare)(const char *s1, const char *s2)>
     14 int 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
     20 template int equal<&__builtin_strcmp>(const char*, const char*);
     21 
     22