| OLD | NEW | 
|---|
| 1 ; RUN: pnacl-abicheck < %s | FileCheck %s | 1 ; RUN: pnacl-abicheck < %s | FileCheck %s | 
|  | 2 ; RUN: pnacl-abicheck -allow-debug-metadata < %s | FileCheck %s --check-prefix=D
     EBUG | 
| 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  Loading... | 
| 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} | 
| OLD | NEW | 
|---|