[llvm] [JITLink][x86-64] Add testcase for ELF LinkGraph triple fix. (PR #176707)

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 19 00:49:42 PST 2026


https://github.com/lhames created https://github.com/llvm/llvm-project/pull/176707

Adds a testcase for the fix in ba6a59c8750.

>From 8ff77a536ed8c8120841a2f51ea0552e8944c4c7 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Mon, 19 Jan 2026 19:47:29 +1100
Subject: [PATCH] [JITLink][x86-64] Add testcase for ELF LinkGraph triple fix.

Adds a testcase for the fix in ba6a59c8750.
---
 .../JITLink/x86-64/ELF_x86-64-freebsd-triple.s   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 llvm/test/ExecutionEngine/JITLink/x86-64/ELF_x86-64-freebsd-triple.s

diff --git a/llvm/test/ExecutionEngine/JITLink/x86-64/ELF_x86-64-freebsd-triple.s b/llvm/test/ExecutionEngine/JITLink/x86-64/ELF_x86-64-freebsd-triple.s
new file mode 100644
index 0000000000000..da31c1745a598
--- /dev/null
+++ b/llvm/test/ExecutionEngine/JITLink/x86-64/ELF_x86-64-freebsd-triple.s
@@ -0,0 +1,16 @@
+# RUN: llvm-mc -triple=x86_64-unknown-freebsd -position-independent \
+# RUN:     -filetype=obj -o %t.o %s
+# RUN: llvm-jitlink -noexec -show-graphs '.*' %t.o | FileCheck %s
+
+# Make sure that the LinkGraph triple correctly reports FreeBSD (tests
+# ba6a59c8750).
+
+# CHECK: LinkGraph {{.*}} (triple = x86_64{{.*}}freebsd)
+
+	.text
+	.globl	main
+	.p2align	4
+	.type	main, at function
+main:
+	xorl	%eax, %eax
+	retq



More information about the llvm-commits mailing list