aboutsummaryrefslogtreecommitdiffstats
path: root/test/Verifier
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2012-06-18 23:34:26 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2012-06-18 23:34:26 +0000
commitf6fc855a00b57786a7a9132095165575a5e45312 (patch)
tree8b9da0476de4b0d35aa6509ec99d8396d78143a7 /test/Verifier
parent90420105964371571ccacdf47771c6ca05db2e67 (diff)
downloadexternal_llvm-f6fc855a00b57786a7a9132095165575a5e45312.zip
external_llvm-f6fc855a00b57786a7a9132095165575a5e45312.tar.gz
external_llvm-f6fc855a00b57786a7a9132095165575a5e45312.tar.bz2
revert r158660, since Chris has some issues with this patch (namely using code to reprent information only used by the compiler)
Original commit msg: add the 'alloc' metadata node to represent the size of offset of buffers pointed to by pointers. This metadata can be attached to any instruction returning a pointer git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158688 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Verifier')
-rw-r--r--test/Verifier/alloc-1.ll48
-rw-r--r--test/Verifier/alloc-2.ll19
2 files changed, 0 insertions, 67 deletions
diff --git a/test/Verifier/alloc-1.ll b/test/Verifier/alloc-1.ll
deleted file mode 100644
index 60917a0..0000000
--- a/test/Verifier/alloc-1.ll
+++ /dev/null
@@ -1,48 +0,0 @@
-; RUN: not llvm-as < %s -o /dev/null |& FileCheck %s
-
-declare i32 @size() readonly
-declare i32 @sizeR()
-declare i32 @size1(i32) readnone
-declare i32 @size1i8(i8) readnone
-declare i32* @sizeptr() readnone
-
-define void @f1(i8** %x, i32* %y) {
-entry:
- %0 = load i8** %x, !alloc !0
- %1 = load i8** %x, !alloc !1
- %2 = load i8** %x, !alloc !2
- %3 = load i8** %x, !alloc !3
- %4 = load i8** %x, !alloc !4
- %5 = load i8** %x, !alloc !5
- %6 = load i8** %x, !alloc !6
- %7 = load i8** %x, !alloc !7
- %8 = load i8** %x, !alloc !8
- %9 = load i32* %y, !alloc !9
- %10 = load i8** %x, !alloc !10
- %11 = load i8** %x, !alloc !11
- ret void
-}
-; CHECK: alloc takes at least one operand
-!0 = metadata !{}
-; CHECK: first parameter of alloc must be a function
-!1 = metadata !{i32 0}
-; CHECK: second parameter of alloc must be either a function or null
-!2 = metadata !{i32 ()* @size, i32 0}
-; CHECK: size function number of parameters mismatch
-!3 = metadata !{i32 ()* @size, null, i32 0}
-; CHECK: offset function number of parameters mismatch
-!4 = metadata !{i32 (i32)* @size1, i32 ()* @size, i32 1}
-; CHECK: size function must be readonly/readnone
-!5 = metadata !{i32 ()* @sizeR, i32 ()* @size}
-; CHECK: offset function must be readonly/readnone
-!6 = metadata !{i32 ()* @size, i32 ()* @sizeR}
-; CHECK: size function parameter type mismatch
-!7 = metadata !{i32 (i32)* @size1, i32 (i8)* @size1i8, i8 5}
-; CHECK: offset function parameter type mismatch
-!8 = metadata !{i32 (i8)* @size1i8, i32 (i32)* @size1, i8 5}
-; CHECK: alloc requires a pointer result
-!9 = metadata !{i32 ()* @size, null}
-; CHECK: size function must return an integer
-!10 = metadata !{i32* ()* @sizeptr, null}
-; CHECK: offset function must return an integer
-!11 = metadata !{i32 ()* @size, i32* ()* @sizeptr}
diff --git a/test/Verifier/alloc-2.ll b/test/Verifier/alloc-2.ll
deleted file mode 100644
index 10496d1..0000000
--- a/test/Verifier/alloc-2.ll
+++ /dev/null
@@ -1,19 +0,0 @@
-; RUN: llvm-as < %s -o /dev/null
-
-declare i32 @size() readonly
-declare i32 @size1(i32) readnone
-declare i32 @size1i8(i8) readnone
-
-define void @ok(i8** %x, i32 %y) {
-entry:
- %0 = load i8** %x, !alloc !0
- %1 = load i8** %x, !alloc !1
- %2 = load i8** %x, !alloc !2
- %3 = load i8** %x, !alloc !3
- %4 = load i8** %x, !alloc !{i32 (i32)* @size1, i32 (i32)* @size1, i32 %y}
- ret void
-}
-!0 = metadata !{i32 ()* @size, i32 ()* @size}
-!1 = metadata !{i32 ()* @size, null}
-!2 = metadata !{i32 (i32)* @size1, i32 (i32)* @size1, i32 0}
-!3 = metadata !{i32 (i8)* @size1i8, i32 (i8)* @size1i8, i8 0}