Files
RedBear-OS/local/recipes/dev/libclc/source/llvm/test/DebugInfo/pr37964.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

36 lines
1.2 KiB
LLVM

; RUN: opt -disable-output -debugify-each -passes=gvn < %s 2>&1 | FileCheck %s
; CHECK-NOT: ERROR: Instruction with empty DebugLoc in function _Z3bazv -- {{%.*}} = phi
; CHECK: CheckFunctionDebugify [GVNPass]: PASS
@foo = dso_local local_unnamed_addr global i32 0, align 4
@x = global i8 17
define dso_local void @_Z3bazv() local_unnamed_addr #0 {
entry:
br label %for.cond
for.cond.loopexit.loopexit: ; preds = %for.inc
br label %for.cond.loopexit
for.cond.loopexit: ; preds = %for.cond.loopexit.loopexit, %for.cond
br label %for.cond
for.cond: ; preds = %for.cond.loopexit, %entry
%.pr = load i32, ptr @foo, align 4
%tobool1 = icmp eq i32 %.pr, 0
br i1 %tobool1, label %for.cond.loopexit, label %for.inc.preheader
for.inc.preheader: ; preds = %for.cond
br label %for.inc
for.inc: ; preds = %for.inc.preheader, %for.inc
%val = load i8, ptr @x
%conv = sext i8 %val to i32
store i32 %conv, ptr @foo, align 4
%tobool = icmp eq i8 %val, 0
br i1 %tobool, label %for.cond.loopexit.loopexit, label %for.inc
}
declare dso_local signext i8 @_Z3barv() local_unnamed_addr #1