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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: test/NaCl/PNaClABI/types.ll
diff --git a/test/NaCl/PNaClABI/types.ll b/test/NaCl/PNaClABI/types.ll
index 6e2d73e82c516b5ab321670ad554f764bc5c35e5..f6f6ab258c95dbcd44855a6e7b53f57638bb0a15 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 -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
+; CHECK: Named metadata node llvm.dbg.cu is disallowed
+!llvm.dbg.cu = !{!0}
!0 = metadata !{ half 0.0}
-!namedmd = !{!0}
+
+; A bit of a hack, but if the metadata is allowed we want to check for types.
+; W have a way to allow metadata with -allow-debug-metadata so use that to
+; test type-checking, even though this is not a conforming dbg metadata schema.
+; 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 madeup is disallowed
+; DEBUG: Named metadata node madeup is disallowed
+!madeup = !{!1}
+!1 = metadata !{ half 1.0}

Powered by Google App Engine
This is Rietveld 408576698