summaryrefslogtreecommitdiffstats
path: root/llvm/test/Linker/distinct-cycles.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Linker/distinct-cycles.ll')
-rw-r--r--llvm/test/Linker/distinct-cycles.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Linker/distinct-cycles.ll b/llvm/test/Linker/distinct-cycles.ll
new file mode 100644
index 00000000000..b9b496c50c1
--- /dev/null
+++ b/llvm/test/Linker/distinct-cycles.ll
@@ -0,0 +1,13 @@
+; RUN: llvm-link -o - -S %s | FileCheck %s
+; Crasher for PR22456: MapMetadata() should resolve all cycles.
+
+; CHECK: !named = !{!0}
+!named = !{!0}
+
+; CHECK: !0 = distinct !{!1}
+!0 = distinct !{!1}
+
+; CHECK-NEXT: !1 = !{!2}
+; CHECK-NEXT: !2 = !{!1}
+!1 = !{!2}
+!2 = !{!1}
OpenPOWER on IntegriCloud