Changeset View
Changeset View
Standalone View
Standalone View
lld/test/ELF/Inputs/bpf-lto-local-2.ll
- This file was added.
; Source code: | |||||
; static __attribute__((noinline)) __attribute__((section("sec3"))) | |||||
; int test() { | |||||
; return 0; | |||||
; } | |||||
; long test2() { return (long)&test; } | |||||
; Compilation flags: | |||||
; clang -target bpf -flto -O2 -S t2.c -o t2.ll | |||||
; ModuleID = 't2.c' | |||||
source_filename = "t2.c" | |||||
target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128" | |||||
target triple = "bpf" | |||||
; Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress | |||||
define dso_local i64 @test2() local_unnamed_addr #0 { | |||||
entry: | |||||
ret i64 ptrtoint (i32 ()* @test to i64) | |||||
} | |||||
; Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn mustprogress | |||||
define internal i32 @test() #1 section "sec3" { | |||||
entry: | |||||
ret i32 0 | |||||
} | |||||
attributes #0 = { nofree norecurse nosync nounwind readnone willreturn mustprogress "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" } | |||||
attributes #1 = { nofree noinline norecurse nosync nounwind readnone willreturn mustprogress "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" } | |||||
!llvm.module.flags = !{!0, !1} | |||||
!llvm.ident = !{!2} | |||||
!0 = !{i32 1, !"wchar_size", i32 4} | |||||
!1 = !{i32 7, !"frame-pointer", i32 2} | |||||
!2 = !{!"clang version 13.0.0 (https://github.com/llvm/llvm-project.git c16909d7d1000413a32d3fcbc765dc082e8b62c0)"} |