summaryrefslogtreecommitdiff
path: root/test/Verifier/metadata-function-prof.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Verifier/metadata-function-prof.ll')
-rw-r--r--test/Verifier/metadata-function-prof.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Verifier/metadata-function-prof.ll b/test/Verifier/metadata-function-prof.ll
new file mode 100644
index 0000000000000..d84a7fe544026
--- /dev/null
+++ b/test/Verifier/metadata-function-prof.ll
@@ -0,0 +1,15 @@
+; RUN: not llvm-as %s -disable-output 2>&1 | FileCheck %s
+
+; CHECK: function declaration may not have a !prof attachment
+declare !prof !0 void @f1()
+
+define void @f2() !prof !0 {
+ unreachable
+}
+
+; CHECK: function must have a single !prof attachment
+define void @f3() !prof !0 !prof !0 {
+ unreachable
+}
+
+!0 = !{}