summaryrefslogtreecommitdiffstats
path: root/test/Verifier
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-06-14 23:13:15 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-06-14 23:13:15 +0000
commitcf9e0af1ce8e645401aabf240954adf031433240 (patch)
treea8f941eaa1027b77381679edc089f2b4e864767a /test/Verifier
parentbfbb0950515d62a8798778b57900e13d8f638368 (diff)
Verifier: check that functions have at most a single !prof attachment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272734 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Verifier')
-rw-r--r--test/Verifier/metadata-function-prof.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Verifier/metadata-function-prof.ll b/test/Verifier/metadata-function-prof.ll
new file mode 100644
index 000000000000..ca0628f44f89
--- /dev/null
+++ b/test/Verifier/metadata-function-prof.ll
@@ -0,0 +1,12 @@
+; RUN: not llvm-as %s -disable-output 2>&1 | FileCheck %s
+
+define void @foo() !prof !0 {
+ unreachable
+}
+
+; CHECK: function must have a single !prof attachment
+define void @foo2() !prof !0 !prof !0 {
+ unreachable
+}
+
+!0 = !{}