brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · bab754f Raw
52 lines · plain
1// REQUIRES: crash-recovery, symlinks2 3// FIXME: This XFAIL is cargo-culted from crash-report.c. Do we need it?4// XFAIL: target={{.*-windows-gnu}}5 6// Test clang can collect symbolic link headers used in modules.7// crash reproducer if there's a symbolic link header file used in a module.8 9// RUN: rm -rf %t10// RUN: mkdir -p %t/i %t/m %t %t/sysroot11// RUN: cp -R %S/Inputs/crash-recovery/usr %t/i/12// RUN: rm -f %t/i/usr/include/pthread_impl.h13// RUN: ln -s pthread/pthread_impl.h %t/i/usr/include/pthread_impl.h14 15// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \16// RUN: not %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \17// RUN:     -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s18 19// RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-vfs-*.m20// RUN: FileCheck --check-prefix=CHECKSH %s -input-file %t/crash-vfs-*.sh21// RUN: FileCheck --check-prefix=CHECKYAML %s -input-file \22// RUN: %t/crash-vfs-*.cache/vfs/vfs.yaml23// RUN: find %t/crash-vfs-*.cache/vfs | \24// RUN:   grep "usr/include/pthread_impl.h" | count 125 26#include "usr/include/stdio.h"27 28// CHECK: Preprocessed source(s) and associated run script(s) are located at:29// CHECK-NEXT: note: diagnostic msg: {{.*}}.m30// CHECK-NEXT: note: diagnostic msg: {{.*}}.cache31 32// CHECKSRC: #pragma clang module import cstd.stdio33 34// CHECKSH: # Crash reproducer35// CHECKSH-NEXT: # Driver args: "-fsyntax-only"36// CHECKSH-NEXT: # Original command: {{.*$}}37// CHECKSH-NEXT: "-cc1"38// CHECKSH: "-isysroot" "{{[^"]*}}/sysroot/"39// CHECKSH-NOT: "-fmodules-cache-path="40// CHECKSH: "crash-vfs-{{[^ ]*}}.m"41// CHECKSH: "-ivfsoverlay" "crash-vfs-{{[^ ]*}}.cache/vfs/vfs.yaml"42// CHECKSH: "-fmodules-cache-path=crash-vfs-{{[^ ]*}}.cache/repro-modules"43 44// CHECKYAML: 'type': 'directory',45// CHECKYAML: 'name': "",46// CHECKYAML-NEXT: 'contents': [47// CHECKYAML-NEXT:   {48// CHECKYAML-NEXT:     'type': 'file',49// CHECKYAML-NEXT:     'name': "pthread_impl.h",50// CHECKYAML-NEXT:     'external-contents': "/{{.*}}/i/usr/include/pthread_impl.h"51// CHECKYAML-NEXT:   },52