diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-10-16 01:49:05 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-10-16 01:49:05 +0000 |
commit | 3aa342be500a55c3bbee302f3a8db937eaa2c241 (patch) | |
tree | 67a3fdefd87ee3ae640e049750695e3cda468ca9 /test/Verifier | |
parent | a486f55569c584d00cfdde43a8755d68cdb68c4f (diff) | |
download | external_llvm-3aa342be500a55c3bbee302f3a8db937eaa2c241.zip external_llvm-3aa342be500a55c3bbee302f3a8db937eaa2c241.tar.gz external_llvm-3aa342be500a55c3bbee302f3a8db937eaa2c241.tar.bz2 |
Add support for metadata representing .ident directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192764 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Verifier')
-rw-r--r-- | test/Verifier/ident-meta1.ll | 12 | ||||
-rw-r--r-- | test/Verifier/ident-meta2.ll | 13 | ||||
-rw-r--r-- | test/Verifier/ident-meta3.ll | 10 |
3 files changed, 35 insertions, 0 deletions
diff --git a/test/Verifier/ident-meta1.ll b/test/Verifier/ident-meta1.ll new file mode 100644 index 0000000..fb247a8 --- /dev/null +++ b/test/Verifier/ident-meta1.ll @@ -0,0 +1,12 @@ +; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s +; Verify that llvm.ident is properly structured. +; llvm.ident takes a list of metadata entries. +; Each metadata entry can have only one string. + +!llvm.ident = !{!0, !1} +!0 = metadata !{metadata !"version string"} +!1 = metadata !{metadata !"string1", metadata !"string2"} +; CHECK: assembly parsed, but does not verify as correct! +; CHECK-NEXT: incorrect number of operands in llvm.ident metadata +; CHECK-NEXT: metadata !1 + diff --git a/test/Verifier/ident-meta2.ll b/test/Verifier/ident-meta2.ll new file mode 100644 index 0000000..e86f18a --- /dev/null +++ b/test/Verifier/ident-meta2.ll @@ -0,0 +1,13 @@ +; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s +; Verify that llvm.ident is properly structured. +; llvm.ident takes a list of metadata entries. +; Each metadata entry can contain one string only. + +!llvm.ident = !{!0, !1, !2, !3} +!0 = metadata !{metadata !"str1"} +!1 = metadata !{metadata !"str2"} +!2 = metadata !{metadata !"str3"} +!3 = metadata !{i32 1} +; CHECK: assembly parsed, but does not verify as correct! +; CHECK-NEXT: invalid value for llvm.ident metadata entry operand(the operand should be a string) +; CHECK-NEXT: i32 1 diff --git a/test/Verifier/ident-meta3.ll b/test/Verifier/ident-meta3.ll new file mode 100644 index 0000000..a847b46 --- /dev/null +++ b/test/Verifier/ident-meta3.ll @@ -0,0 +1,10 @@ +; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s +; Verify that llvm.ident is properly structured. +; llvm.ident takes a list of metadata entries. +; Each metadata entry can contain one string only. + +!llvm.ident = !{!0} +!0 = metadata !{metadata !{metadata !"nested metadata"}} +; CHECK: assembly parsed, but does not verify as correct! +; CHECK-NEXT: invalid value for llvm.ident metadata entry operand(the operand should be a string) +; CHECK-NEXT: metadata !1 |