CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
51 lines
1.8 KiB
C
51 lines
1.8 KiB
C
// This test checks that reusing FileManager produces deterministic results on case-insensitive filesystems.
|
|
|
|
// RUN: rm -rf %t
|
|
// RUN: split-file %s %t
|
|
|
|
//--- dir1/arm/lower.h
|
|
//--- dir2/ARM/upper.h
|
|
//--- t1.c
|
|
#include "upper.h"
|
|
//--- t2.c
|
|
#include "arm/lower.h"
|
|
|
|
//--- cdb.json.template
|
|
[{
|
|
"directory": "DIR",
|
|
"command": "clang -fsyntax-only DIR/t1.c -I DIR/dir2/ARM -I DIR/dir1",
|
|
"file": "DIR/t1.c"
|
|
},{
|
|
"directory": "DIR",
|
|
"command": "clang -fsyntax-only DIR/t2.c -I DIR/dir2 -I DIR/dir1",
|
|
"file": "DIR/t2.c"
|
|
}]
|
|
|
|
//--- cdb-rev.json.template
|
|
[{
|
|
"directory": "DIR",
|
|
"command": "clang -fsyntax-only DIR/t2.c -I DIR/dir2 -I DIR/dir1",
|
|
"file": "DIR/t2.c"
|
|
},{
|
|
"directory": "DIR",
|
|
"command": "clang -fsyntax-only DIR/t1.c -I DIR/dir2/ARM -I DIR/dir1",
|
|
"file": "DIR/t1.c"
|
|
}]
|
|
|
|
// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json
|
|
// RUN: sed -e "s|DIR|%/t|g" %t/cdb-rev.json.template > %t/cdb-rev.json
|
|
|
|
// RUN: clang-scan-deps -compilation-database=%t/cdb.json -format make -j 1 | sed 's:\\\\\?:/:g' | FileCheck %s
|
|
|
|
// In the reversed case, Clang starts by scanning "t2.c". When looking up the "arm/lower.h" header,
|
|
// the string is appended to "DIR/dir2". That file ("DIR/dir2/arm/lower.h") doesn't exist, but when
|
|
// learning so, the FileManager stats and caches the parent directory ("DIR/dir2/arm"), using the
|
|
// UID as the key.
|
|
// When scanning "t1.c" later on, the "DIR/dir2/ARM" search directory is assigned the **same**
|
|
// directory entry (with lowercase "arm"), since they share the UID on case-insensitive filesystems.
|
|
// To preserve the correct case throughout the compiler for any file within that directory, it's
|
|
// important to use the spelling actually used, not just the cached one.
|
|
// RUN: clang-scan-deps -compilation-database=%t/cdb-rev.json -format make -j 1 | sed 's:\\\\\?:/:g' | FileCheck %s
|
|
|
|
// CHECK: ARM/upper.h
|