Files
clang-p2996/llvm/test/CodeGen/BPF/BTF/empty-btf.ll
Yonghong Song d82247cb80 [BPF] Do not generate BTF sections unnecessarily
If There is no types/non-empty strings, do not generate
.BTF section. If there is no func_info/line_info, do
not generate .BTF.ext section.

Signed-off-by: Yonghong Song <yhs@fb.com>

Differential Revision: https://reviews.llvm.org/D58936

llvm-svn: 355360
2019-03-05 01:01:21 +00:00

23 lines
602 B
LLVM

; 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 "}