summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2012-06-22 18:01:38 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2012-06-22 18:01:38 +0000
commitc65221decfde0f3ce0f7eabd2d83cf91c4c1d887 (patch)
tree05ae1c1f927816639b0c8693ec7a0fbec1a6d6a7 /clang/test
parentbbad269a3ec2c810ebcb4fa529b67183a2a87d08 (diff)
downloadbcm5719-llvm-c65221decfde0f3ce0f7eabd2d83cf91c4c1d887.tar.gz
bcm5719-llvm-c65221decfde0f3ce0f7eabd2d83cf91c4c1d887.zip
revert CodeGen support for the alloc_size attribute until we finish the design of a more generic metadata node
llvm-svn: 159016
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGen/alloc_size.c11
-rw-r--r--clang/test/CodeGenCXX/alloc_size.cpp18
2 files changed, 0 insertions, 29 deletions
diff --git a/clang/test/CodeGen/alloc_size.c b/clang/test/CodeGen/alloc_size.c
deleted file mode 100644
index 05aa8456ee1..00000000000
--- a/clang/test/CodeGen/alloc_size.c
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
-
-void *my_recalloc(void *, unsigned, unsigned) __attribute__((alloc_size(2,3)));
-
-// CHECK: @f
-void* f() {
- // CHECK: call i8* @my_recalloc{{.*}}, !alloc_size !0
- return my_recalloc(0, 11, 27);
-}
-
-// CHECK: !0 = metadata !{i32 1, i32 2}
diff --git a/clang/test/CodeGenCXX/alloc_size.cpp b/clang/test/CodeGenCXX/alloc_size.cpp
deleted file mode 100644
index 90273cc8930..00000000000
--- a/clang/test/CodeGenCXX/alloc_size.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
-
-struct foo {
- void *my_alloc(unsigned) __attribute__((alloc_size(2)));
- static void* static_alloc(unsigned) __attribute__((alloc_size(1)));
-};
-
-
-void* f(bool a) {
- // CHECK: call i8* {{.*}}alloc{{.*}}, !alloc_size !0
- // CHECK: call i8* {{.*}}static_alloc{{.*}}, !alloc_size !1
- foo obj;
- return a ? obj.my_alloc(2) :
- foo::static_alloc(42);
-}
-
-// CHECK: !0 = metadata !{i32 1}
-// CHECK: !1 = metadata !{i32 0}
OpenPOWER on IntegriCloud