brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 9564f11 Raw
51 lines · plain
1// UNSUPPORTED: system-windows2// REQUIRES: crash-recovery3 4// FIXME: This XFAIL is cargo-culted from crash-report.c. Do we need it?5// XFAIL: target={{.*-windows-gnu}}6 7// Test clang can collect symbolic link headers used in modules.8// crash reproducer if there's a symbolic link header file used in a module.9 10// RUN: rm -rf %t11// RUN: mkdir -p %t/i %t/m %t %t/sysroot12// RUN: cp -R %S/Inputs/crash-recovery/usr %t/i/13 14// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \15// RUN: not %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \16// RUN:     -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s17 18// RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-vfs-*.m19// RUN: FileCheck --check-prefix=CHECKSH %s -input-file %t/crash-vfs-*.sh20// RUN: FileCheck --check-prefix=CHECKYAML %s -input-file \21// RUN: %t/crash-vfs-*.cache/vfs/vfs.yaml22// RUN: find %t/crash-vfs-*.cache/vfs | \23// RUN:   grep "usr/include/stdio.h" | count 124 25#include "usr/include/stdio.h"26 27// CHECK: Preprocessed source(s) and associated run script(s) are located at:28// CHECK-NEXT: note: diagnostic msg: {{.*}}.m29// CHECK-NEXT: note: diagnostic msg: {{.*}}.cache30 31// CHECKSRC: #pragma clang module import cstd.stdio32 33// CHECKSH: # Crash reproducer34// CHECKSH-NEXT: # Driver args: "-fsyntax-only"35// CHECKSH-NEXT: # Original command: {{.*$}}36// CHECKSH-NEXT: "-cc1"37// CHECKSH: "-isysroot" "{{[^"]*}}/sysroot/"38// CHECKSH-NOT: "-fmodules-cache-path="39// CHECKSH: "crash-vfs-{{[^ ]*}}.m"40// CHECKSH: "-ivfsoverlay" "crash-vfs-{{[^ ]*}}.cache/vfs/vfs.yaml"41// CHECKSH: "-fmodules-cache-path=crash-vfs-{{[^ ]*}}.cache/repro-modules"42 43// CHECKYAML: 'type': 'directory',44// CHECKYAML: 'name': "",45// CHECKYAML-NEXT: 'contents': [46// CHECKYAML-NEXT:   {47// CHECKYAML-NEXT:     'type': 'file',48// CHECKYAML-NEXT:     'name': "pthread_impl.h",49// CHECKYAML-NEXT:     'external-contents': "/{{.*}}/i/usr/include/pthread_impl.h"50// CHECKYAML-NEXT:   },51