summaryrefslogtreecommitdiffstats
path: root/llvm/test/Verifier
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-01-11 22:36:48 +0000
committerDuncan Sands <baldrick@free.fr>2008-01-11 22:36:48 +0000
commitb99f44aa5e7e427e2dca0286497801ad6a972cf8 (patch)
tree25ed9b94698b70c7f880a41b9104b890bb87fe34 /llvm/test/Verifier
parentb5bd924e839a3bef97fb44f68f3d1172aaee1c4b (diff)
downloadbcm5719-llvm-b99f44aa5e7e427e2dca0286497801ad6a972cf8.tar.gz
bcm5719-llvm-b99f44aa5e7e427e2dca0286497801ad6a972cf8.zip
Do not allow attributes beyond a function's last
parameter, even if it is a varargs function. Do allow attributes on the varargs part of a call, but not beyond the last argument. Only allow selected attributes to be on the varargs part of a call (currently only 'byval' is allowed). The reasoning here is that most attributes, eg inreg, simply make no sense here. llvm-svn: 45887
Diffstat (limited to 'llvm/test/Verifier')
-rw-r--r--llvm/test/Verifier/2008-01-11-VarargAttrs.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/Verifier/2008-01-11-VarargAttrs.ll b/llvm/test/Verifier/2008-01-11-VarargAttrs.ll
new file mode 100644
index 00000000000..1f4c9c72b40
--- /dev/null
+++ b/llvm/test/Verifier/2008-01-11-VarargAttrs.ll
@@ -0,0 +1,10 @@
+; RUN: not llvm-as < %s
+
+ %struct = type { }
+
+declare void @foo(...)
+
+define void @bar() {
+ call void (...)* @foo(%struct* inreg null )
+ ret void
+}
OpenPOWER on IntegriCloud