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

Side by Side Diff: test/Driver/le32-unknown-nacl.cpp

Issue 7748035: PNaClTargetInfo: add __ELF__, _REENTRANT and _GNU_SOURCE defines and update the test. (Closed) Base URL: https://llvm.org/svn/llvm-project/cfe/trunk/
Patch Set: include <stdio.h> in the test Created 9 years, 3 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/Basic/Targets.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
1 // RUN: %clang -ccc-host-triple le32-unknown-nacl -ccc-echo %s -emit-llvm -c 2>& 1 | FileCheck %s -check-prefix=ECHO 1 // RUN: %clang -ccc-host-triple le32-unknown-nacl -ccc-echo %s -emit-llvm -c 2>& 1 | FileCheck %s -check-prefix=ECHO
2 // RUN: %clang -ccc-host-triple le32-unknown-nacl %s -emit-llvm -S -c -o - | Fil eCheck %s 2 // RUN: %clang -ccc-host-triple le32-unknown-nacl %s -emit-llvm -S -c -o - | Fil eCheck %s
3 3
4 // ECHO: clang{{.*}} -cc1 {{.*}}le32-unknown-nacl.c 4 // ECHO: clang{{.*}} -cc1 {{.*}}le32-unknown-nacl.c
5 5
6 // Check platform defines 6 // Check platform defines
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 extern "C" { 9 extern "C" {
10 10
11 #ifdef __native_client__ 11 #ifdef __native_client__
12 void __native_client__defined() { 12 void __native_client__defined() {
13 // CHECK: __native_client__defined 13 // CHECK: __native_client__defined
14 } 14 }
15 #endif 15 #endif
16 16
17 #ifdef __le32__ 17 #ifdef __le32__
18 void __le32__defined() { 18 void __le32__defined() {
19 // CHECK: __le32__defined 19 // CHECK: __le32__defined
20 } 20 }
21 #endif 21 #endif
22 22
23 #ifdef __pnacl__ 23 #ifdef __pnacl__
24 void __pnacl__defined() { 24 void __pnacl__defined() {
25 // CHECK: __pnacl__defined 25 // CHECK: __pnacl__defined
26 } 26 }
27 #endif 27 #endif
28 28
29 #ifdef unix
30 void unixdefined() {
31 // CHECK: unixdefined
32 }
33 #endif
34
35 #ifdef __ELF__
36 void __ELF__defined() {
37 // CHECK: __ELF__defined
38 }
39 #endif
40
41 #ifdef _GNU_SOURCE
42 void _GNU_SOURCEdefined() {
43 // CHECK: _GNU_SOURCEdefined
jvoung - send to chromium... 2011/08/26 00:06:05 Does this set Opts.CPlusPlus? I guess so. To test
44 }
45 #endif
46
47
29 // Check types 48 // Check types
30 49
31 // CHECK: signext i8 @check_char() 50 // CHECK: signext i8 @check_char()
32 char check_char() { return 0; } 51 char check_char() { return 0; }
33 52
34 // CHECK: signext i16 @check_short() 53 // CHECK: signext i16 @check_short()
35 short check_short() { return 0; } 54 short check_short() { return 0; }
36 55
37 // CHECK: i32 @check_int() 56 // CHECK: i32 @check_int()
38 int check_int() { return 0; } 57 int check_int() { return 0; }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void check_pointer_size() { 101 void check_pointer_size() {
83 // CHECK: SwitchILi4 102 // CHECK: SwitchILi4
84 Switch<sizeof(void*)>(); 103 Switch<sizeof(void*)>();
85 104
86 // CHECK: SwitchILi8 105 // CHECK: SwitchILi8
87 Switch<sizeof(long long)>(); 106 Switch<sizeof(long long)>();
88 107
89 // CHECK: SwitchILi16 108 // CHECK: SwitchILi16
90 Switch<sizeof(va_list)>(); 109 Switch<sizeof(va_list)>();
91 } 110 }
111
112 #include <stdio.h>
OLDNEW
« no previous file with comments | « lib/Basic/Targets.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698