summaryrefslogtreecommitdiff
path: root/test/Other
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2009-09-15 06:28:26 +0000
committerNick Lewycky <nicholas@mxc.ca>2009-09-15 06:28:26 +0000
commit1fbb13e4fa1e6cd077e6581f06638c85824fbd10 (patch)
treeac4c1236a79a5cd2d0b7d1461e3b887a25a78c31 /test/Other
parentdd4238e04dc8a5144d9c19bd53cf9650d1472309 (diff)
downloadllvm-1fbb13e4fa1e6cd077e6581f06638c85824fbd10.tar.gz
llvm-1fbb13e4fa1e6cd077e6581f06638c85824fbd10.tar.bz2
llvm-1fbb13e4fa1e6cd077e6581f06638c85824fbd10.tar.xz
Forbid arrays of function-type and structures with function-typed fields.
While I'm there, change code that does: SomeTy == Type::getFooType(Context) into: SomeTy->getTypeID() == FooTyID to decrease the amount of useless type creation which may involve locking, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81846 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Other')
-rw-r--r--test/Other/2009-09-14-function-elements.ll6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Other/2009-09-14-function-elements.ll b/test/Other/2009-09-14-function-elements.ll
new file mode 100644
index 0000000000..883d76d107
--- /dev/null
+++ b/test/Other/2009-09-14-function-elements.ll
@@ -0,0 +1,6 @@
+; RUN: not llvm-as %s -disable-output 2>/dev/null
+
+; Arrays and structures with function types (not function pointers) are illegal.
+
+@foo = external global [4 x i32 (i32)]
+@bar = external global { i32 (i32) }