summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/BPF/BTF/empty-btf.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/BPF/BTF/empty-btf.ll')
-rw-r--r--llvm/test/CodeGen/BPF/BTF/empty-btf.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/BPF/BTF/empty-btf.ll b/llvm/test/CodeGen/BPF/BTF/empty-btf.ll
new file mode 100644
index 00000000000..b54df9ff765
--- /dev/null
+++ b/llvm/test/CodeGen/BPF/BTF/empty-btf.ll
@@ -0,0 +1,22 @@
+; RUN: llc -march=bpfel -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s
+; RUN: llc -march=bpfeb -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s
+
+; Source code:
+; int test(int arg) { return arg; }
+; Compilation flag:
+; clang -target bpf -O2 -S -emit-llvm t.c
+
+; Function Attrs: norecurse nounwind readnone
+define dso_local i32 @test(i32 returned) local_unnamed_addr #0 {
+ ret i32 %0
+}
+
+; CHECK-NOT: BTF
+
+attributes #0 = { norecurse nounwind readnone }
+
+!llvm.module.flags = !{!0}
+!llvm.ident = !{!1}
+
+!0 = !{i32 1, !"wchar_size", i32 4}
+!1 = !{!"clang version 8.0.20181009 "}
OpenPOWER on IntegriCloud