Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1105)

Side by Side Diff: test/CodeGen/le32-vaarg.c

Issue 183973037: Cherry-pick Clang upstream r199830 - Handle va_arg on struct types for the le32 target (PNaCl and E… (Closed) Base URL: http://git.chromium.org/native_client/pnacl-clang.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/CodeGen/CGExprAgg.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // RUN: %clang_cc1 -triple le32-unknown-nacl -emit-llvm -o - %s | FileCheck %s
2 #include <stdarg.h>
3
4 int get_int(va_list *args) {
5 return va_arg(*args, int);
6 }
7 // CHECK: define i32 @get_int
8 // CHECK: [[RESULT:%[a-z_0-9]+]] = va_arg {{.*}}, i32{{$}}
9 // CHECK: ret i32 [[RESULT]]
10
11 struct Foo {
12 int x;
13 };
14
15 struct Foo dest;
16
17 void get_struct(va_list *args) {
18 dest = va_arg(*args, struct Foo);
19 }
20 // CHECK: define void @get_struct
21 // CHECK: [[RESULT:%[a-z_0-9]+]] = va_arg {{.*}}, %struct.Foo{{$}}
22 // CHECK: store %struct.Foo [[RESULT]], %struct.Foo* @dest
23
24 void skip_struct(va_list *args) {
25 va_arg(*args, struct Foo);
26 }
27 // CHECK: define void @skip_struct
28 // CHECK: va_arg {{.*}}, %struct.Foo{{$}}
OLDNEW
« no previous file with comments | « lib/CodeGen/CGExprAgg.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698