cb424d7448
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).
35 lines
902 B
LLVM
35 lines
902 B
LLVM
; RUN: llvm-as < %s | llvm-dis > %t1.ll
|
|
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
|
|
; RUN: diff %t1.ll %t2.ll
|
|
|
|
%FunTy = type i32 (i32)
|
|
|
|
define void @invoke(ptr %x) {
|
|
%foo = call i32 %x( i32 123 ) ; <i32> [#uses=0]
|
|
%foo2 = tail call i32 %x( i32 123 ) ; <i32> [#uses=0]
|
|
ret void
|
|
}
|
|
|
|
define i32 @main(i32 %argc) personality ptr @__gxx_personality_v0 {
|
|
%retval = call i32 @test( i32 %argc ) ; <i32> [#uses=2]
|
|
%two = add i32 %retval, %retval ; <i32> [#uses=1]
|
|
%retval2 = invoke i32 @test( i32 %argc )
|
|
to label %Next unwind label %Error ; <i32> [#uses=1]
|
|
|
|
Next:
|
|
%two2 = add i32 %two, %retval2 ; <i32> [#uses=1]
|
|
call void @invoke( ptr @test )
|
|
ret i32 %two2
|
|
|
|
Error:
|
|
%exn = landingpad {ptr, i32}
|
|
cleanup
|
|
ret i32 -1
|
|
}
|
|
|
|
define i32 @test(i32 %i0) {
|
|
ret i32 %i0
|
|
}
|
|
|
|
declare i32 @__gxx_personality_v0(...)
|