blob: 7b17e14653d051d1d4dbecf0c4e8404ceaa5f936 [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() {
Tim Northover55f05932013-02-07 15:11:36 +00007 // CHECK: call {{signext i8|i8}} @memmove()
Douglas Gregorb68e3992010-12-21 19:47:46 +00008 return memmove();
9}
Richard Smith5154dce2013-07-11 02:27:57 +000010
11struct S;
12// CHECK: define {{.*}} @_Z9addressofbR1SS0_(
13S *addressof(bool b, S &s, S &t) {
14 // CHECK: %[[LVALUE:.*]] = phi
15 // CHECK: ret {{.*}}* %[[LVALUE]]
16 return __builtin_addressof(b ? s : t);
17}