36 lines · plain
1; RUN: llc -mtriple=bpfel -filetype=obj < %s | llvm-readelf -S - | FileCheck %s2; RUN: llc -mtriple=bpfeb -filetype=obj < %s | llvm-readelf -S - | FileCheck %s3; Source:4; int foo() { return 0; }5; Compilation flags:6; clang -target bpf -O2 -g -S -emit-llvm t.c7 8; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn9define dso_local i32 @foo() local_unnamed_addr #0 !dbg !7 {10entry:11 ret i32 0, !dbg !1212}13; CHECK: Name Type Address Off Size ES Flg Lk Inf Al14; CHECK: .BTF PROGBITS 0000000000000000 {{[0-9a-f]+}} {{[0-9a-f]+}} 00 0 0 415; CHECK: .BTF.ext PROGBITS 0000000000000000 {{[0-9a-f]+}} {{[0-9a-f]+}} 00 0 0 416 17attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone willreturn "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }18 19!llvm.dbg.cu = !{!0}20!llvm.module.flags = !{!2, !3, !4, !5}21!llvm.ident = !{!6}22 23!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 14.0.0 (https://github.com/llvm/llvm-project.git b1ab2a57b83e4b7224c38b534532500cc90e5b9a)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)24!1 = !DIFile(filename: "t.c", directory: "/tmp/home/yhs/work/tests/llvm/align")25!2 = !{i32 7, !"Dwarf Version", i32 4}26!3 = !{i32 2, !"Debug Info Version", i32 3}27!4 = !{i32 1, !"wchar_size", i32 4}28!5 = !{i32 7, !"frame-pointer", i32 2}29!6 = !{!"clang version 14.0.0 (https://github.com/llvm/llvm-project.git b1ab2a57b83e4b7224c38b534532500cc90e5b9a)"}30!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !11)31!8 = !DISubroutineType(types: !9)32!9 = !{!10}33!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)34!11 = !{}35!12 = !DILocation(line: 1, column: 13, scope: !7)36