Files
RedBear-OS/local/recipes/dev/libclc/source/llvm/test/Bitcode/thinlto-function-summary-callgraph-cast.ll
T
vasilito cb424d7448 build: static patch-sanity linter (shift-left the malformed-patch class)
verify-patch-sanity.py validates every active recipe .patch has internally-
consistent hunk line counts — catching the 'malformed patch at line N' failure
at commit/CI/preflight time instead of hours into a cook. This cycle hit that
class three times (qtwaylandscanner, sddm, xwayland), each only discovered when
cookbook tried to apply the patch.

Running it across the repo found 29 latent malformed patches (validated against
GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22').
They were harmless only because they sit in vendored recipes (baked, not re-
applied) — but would fail on any version-bump re-derivation. --fix recounts the
hunk headers (body untouched) and repaired all 29.

Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test
(test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats
(empty placeholders, bare-@@ git hunks).
2026-08-01 05:13:02 +03:00

45 lines
1.2 KiB
LLVM

; Test to check the callgraph for calls to casts.
; RUN: opt -module-summary %s -o %t.o
; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s
; PR34966
; CHECK: <GLOBALVAL_SUMMARY_BLOCK
; CHECK-NEXT: <VERSION
; CHECK-NEXT: <FLAGS
; "op7" is a call to "callee" function.
; CHECK-NEXT: <PERMODULE_PROFILE {{.*}} op7=3 op8=0 op9=[[ALIASID:[0-9]+]]
; "another_caller" has only references but no calls.
; CHECK-NEXT: <PERMODULE_PROFILE {{.*}}/>
; CHECK-NEXT: <PERMODULE_PROFILE {{.*}} op0=[[ALIASEEID:[0-9]+]]
; CHECK-NEXT: <ALIAS {{.*}} op0=[[ALIASID]] {{.*}} op2=[[ALIASEEID]]/>
; CHECK-NEXT: </GLOBALVAL_SUMMARY_BLOCK>
; ModuleID = 'thinlto-function-summary-callgraph-cast.ll'
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define void @caller() {
call void @callee()
call void @analias()
ret void
}
define void @another_caller() {
; Test calls that aren't handled either as direct or indirect.
call void getelementptr (i8, ptr @f, i64 ptrtoint (ptr @g to i64))()
ret void
}
declare void @callee(...)
@analias = alias void (...), ptr @aliasee
define void @aliasee() {
entry:
ret void
}
declare void @f()
declare void @g()
@global = extern_weak global i32