Eli Friedman | 55d4848 | 2011-05-26 00:10:27 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10 < %s | FileCheck %s |
2 | |||||
3 | struct Test1S { | ||||
4 | long NumDecls; | ||||
5 | long X; | ||||
6 | long Y; | ||||
7 | }; | ||||
8 | struct Test2S { | ||||
9 | long NumDecls; | ||||
10 | long X; | ||||
11 | }; | ||||
12 | |||||
13 | // Make sure we don't generate extra memcpy for lvalues | ||||
14 | void test1a(struct Test1S, struct Test2S); | ||||
15 | // CHECK: define void @test1( | ||||
16 | // CHECK-NOT: memcpy | ||||
17 | // CHECK: call void @test1a | ||||
18 | void test1(struct Test1S *A, struct Test2S *B) { | ||||
19 | test1a(*A, *B); | ||||
20 | } |