[PATCH] [bpf] Test case for symbol information in object file

Paul Chaignon via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 22 02:53:57 PDT 2018


This patch tests the change introduced in r342556.

Signed-off-by: Paul Chaignon <paul.chaignon at orange.com>
---
 test/CodeGen/BPF/elf-symbol-information.ll | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 test/CodeGen/BPF/elf-symbol-information.ll

diff --git a/test/CodeGen/BPF/elf-symbol-information.ll b/test/CodeGen/BPF/elf-symbol-information.ll
new file mode 100644
index 00000000000..37af7eddea5
--- /dev/null
+++ b/test/CodeGen/BPF/elf-symbol-information.ll
@@ -0,0 +1,8 @@
+; RUN: llc -march=bpfel -filetype=obj -o - %s | llvm-readelf --symbols | FileCheck %s
+
+; CHECK: 0 FILE    LOCAL  DEFAULT  ABS elf-symbol-information.ll
+; CHECK: 8 FUNC    GLOBAL DEFAULT    2 test_func
+define void @test_func() {
+entry:
+  ret void
+}
-- 
2.17.1


More information about the llvm-commits mailing list