Index: test/NaCl/PNaClABI/types.ll |
diff --git a/test/NaCl/PNaClABI/types.ll b/test/NaCl/PNaClABI/types.ll |
index 6e2d73e82c516b5ab321670ad554f764bc5c35e5..f7685a9d616a4737c93c1b71ac2ccb066720d363 100644 |
--- a/test/NaCl/PNaClABI/types.ll |
+++ b/test/NaCl/PNaClABI/types.ll |
@@ -1,4 +1,5 @@ |
; RUN: pnacl-abicheck < %s | FileCheck %s |
+; RUN: pnacl-abicheck -pnaclabi-allow-debug-metadata < %s | FileCheck %s --check-prefix=DEBUG |
; Test types allowed by PNaCl ABI |
; Basic global types |
@@ -112,6 +113,17 @@ declare void @badArgType1(half %a, i32 %b) |
; CHECK: Function badArgType2 argument 2 has disallowed type |
declare void @badArgType2(i32 %a, half %b) |
-; CHECK: Named metadata node namedmd refers to disallowed type |
+; If the metadata is allowed we want to check for types. |
+; We have a hacky way to test this. The -allow-debug-metadata whitelists debug |
+; metadata. That allows us to check types within debug metadata, even though |
+; debug metadata normally does not have illegal types. |
+; DEBUG-NOT: Named metadata node llvm.dbg.cu is disallowed |
+; DEBUG: Named metadata node llvm.dbg.cu refers to disallowed type: half |
+; CHECK: Named metadata node llvm.dbg.cu is disallowed |
+!llvm.dbg.cu = !{!0} |
!0 = metadata !{ half 0.0} |
-!namedmd = !{!0} |
+ |
+; CHECK: Named metadata node madeup is disallowed |
+; DEBUG: Named metadata node madeup is disallowed |
+!madeup = !{!1} |
+!1 = metadata !{ half 1.0} |