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

Side by Side Diff: test/NaCl/PNaClABI/types.ll

Issue 14329025: Check for metadata in PNaCl ABI checker. (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: make test prettier Created 7 years, 8 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/Analysis/NaCl/PNaClABIVerifyModule.cpp ('k') | test/NaCl/PNaClABI/types-function.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; RUN: pnacl-abicheck < %s | FileCheck %s 1 ; RUN: pnacl-abicheck < %s | FileCheck %s
2 ; RUN: pnacl-abicheck -pnaclabi-allow-debug-metadata < %s | FileCheck %s --check -prefix=DEBUG
2 ; Test types allowed by PNaCl ABI 3 ; Test types allowed by PNaCl ABI
3 4
4 ; Basic global types 5 ; Basic global types
5 6
6 ; TODO(mseaborn): Re-enable integer size checking. 7 ; TODO(mseaborn): Re-enable integer size checking.
7 ; See https://code.google.com/p/nativeclient/issues/detail?id=3360 8 ; See https://code.google.com/p/nativeclient/issues/detail?id=3360
8 ; C;HECK: Variable i4 has disallowed type: i4 9 ; C;HECK: Variable i4 has disallowed type: i4
9 ;@i4 = private global i4 0 10 ;@i4 = private global i4 0
10 ; C;HECK: Variable i33 has disallowed type: i33 11 ; C;HECK: Variable i33 has disallowed type: i33
11 ;@i33 = private global i33 0 12 ;@i33 = private global i33 0
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 @alias1 = alias i32* @i32 106 @alias1 = alias i32* @i32
106 107
107 ; CHECK: Function badReturn has disallowed return type 108 ; CHECK: Function badReturn has disallowed return type
108 declare half* @badReturn() 109 declare half* @badReturn()
109 110
110 ; CHECK: Function badArgType1 argument 1 has disallowed type 111 ; CHECK: Function badArgType1 argument 1 has disallowed type
111 declare void @badArgType1(half %a, i32 %b) 112 declare void @badArgType1(half %a, i32 %b)
112 ; CHECK: Function badArgType2 argument 2 has disallowed type 113 ; CHECK: Function badArgType2 argument 2 has disallowed type
113 declare void @badArgType2(i32 %a, half %b) 114 declare void @badArgType2(i32 %a, half %b)
114 115
115 ; CHECK: Named metadata node namedmd refers to disallowed type 116 ; If the metadata is allowed we want to check for types.
117 ; We have a hacky way to test this. The -allow-debug-metadata whitelists debug
118 ; metadata. That allows us to check types within debug metadata, even though
119 ; debug metadata normally does not have illegal types.
120 ; DEBUG-NOT: Named metadata node llvm.dbg.cu is disallowed
121 ; DEBUG: Named metadata node llvm.dbg.cu refers to disallowed type: half
122 ; CHECK: Named metadata node llvm.dbg.cu is disallowed
123 !llvm.dbg.cu = !{!0}
116 !0 = metadata !{ half 0.0} 124 !0 = metadata !{ half 0.0}
117 !namedmd = !{!0} 125
126 ; CHECK: Named metadata node madeup is disallowed
127 ; DEBUG: Named metadata node madeup is disallowed
128 !madeup = !{!1}
129 !1 = metadata !{ half 1.0}
OLDNEW
« no previous file with comments | « lib/Analysis/NaCl/PNaClABIVerifyModule.cpp ('k') | test/NaCl/PNaClABI/types-function.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698