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

Side by Side Diff: test/NaCl/PNaClABI/abi-switch.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 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 | « test/NaCl/PNaClABI/abi-stripped-pointers.ll ('k') | test/NaCl/PNaClABI/abi-varargs.ll » ('j') | 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: not pnacl-abicheck < %s | FileCheck %s
2
3 @var = internal global [4 x i8] c"xxxx"
4
5
6 ; CHECK-NOT: disallowed
7
8 define internal void @bad_cases() {
9 ; ConstantExprs should be rejected here.
10 switch i32 ptrtoint ([4 x i8]* @var to i32), label %next [i32 0, label %next]
11 ; CHECK: disallowed: bad switch condition
12 next:
13
14 ; Bad integer type.
15 switch i32 0, label %next [i99 0, label %next]
16 ; CHECK: bad switch case
17
18 ; Bad integer type.
19 switch i32 0, label %next [i32 0, label %next
20 i99 1, label %next]
21 ; CHECK: bad switch case
22
23 ; Note that the reader only allows ConstantInts in the label list.
24 ; We don't need to check the following, because the reader rejects
25 ; it:
26 ; switch i32 0, label %next [i32 ptrtoint (i32* @ptr to i32), label %next]
27
28 ret void
29 }
30
31 ; CHECK-NOT: disallowed
32
33
34 ; This stops the verifier from complaining about the lack of an entry point.
35 define void @_start(i32 %arg) {
36 ret void
37 }
OLDNEW
« no previous file with comments | « test/NaCl/PNaClABI/abi-stripped-pointers.ll ('k') | test/NaCl/PNaClABI/abi-varargs.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698