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).
31 lines
1.3 KiB
C
31 lines
1.3 KiB
C
// RUN: %clang_cc1 -triple arm-none-eabi -fdump-record-layouts-simple -ffreestanding -emit-llvm -o %t %s | FileCheck %s -check-prefixes=LAYOUT,LAYOUT-32
|
|
// RUN: FileCheck %s -check-prefixes=IR,IR-32 <%t
|
|
// RUN: %clang_cc1 -triple aarch64 -fdump-record-layouts-simple -ffreestanding -emit-llvm -o %t %s | FileCheck %s -check-prefixes=LAYOUT,LAYOUT-64
|
|
// RUN: FileCheck %s -check-prefixes=IR,IR-64 <%t
|
|
|
|
extern struct T {
|
|
int b0 : 8;
|
|
int b1 : 24;
|
|
int b2 : 1;
|
|
} g;
|
|
|
|
int func(void) {
|
|
return g.b1;
|
|
}
|
|
|
|
// IR: @g = external global %struct.T, align 4
|
|
// IR-32: %{{.*}} = load i32, ptr @g, align 4
|
|
// IR-64: %{{.*}} = load i64, ptr @g, align 4
|
|
|
|
// LAYOUT-LABEL: LLVMType:%struct.T =
|
|
// LAYOUT-32-SAME: type { i32, i8 }
|
|
// LAYOUT-64-SAME: type { i64 }
|
|
// LAYOUT: BitFields:[
|
|
// LAYOUT-32-NEXT: <CGBitFieldInfo Offset:0 Size:8 IsSigned:1 StorageSize:32 StorageOffset:0
|
|
// LAYOUT-32-NEXT: <CGBitFieldInfo Offset:8 Size:24 IsSigned:1 StorageSize:32 StorageOffset:0
|
|
// LAYOUT-32-NEXT: <CGBitFieldInfo Offset:0 Size:1 IsSigned:1 StorageSize:8 StorageOffset:4
|
|
// LAYOUT-64-NEXT: <CGBitFieldInfo Offset:0 Size:8 IsSigned:1 StorageSize:64 StorageOffset:0
|
|
// LAYOUT-64-NEXT: <CGBitFieldInfo Offset:8 Size:24 IsSigned:1 StorageSize:64 StorageOffset:0
|
|
// LAYOUT-64-NEXT: <CGBitFieldInfo Offset:32 Size:1 IsSigned:1 StorageSize:64 StorageOffset:0
|
|
// LAYOUT-NEXT: ]>
|