2017-05-02 05:49:54 +08:00
|
|
|
// REQUIRES: crash-recovery, shell, system-darwin
|
2016-12-11 12:27:28 +08:00
|
|
|
|
|
|
|
// RUN: rm -rf %t
|
2018-06-22 05:45:24 +08:00
|
|
|
// RUN: mkdir -p %t/m %t/i/Foo.framework/Headers
|
2016-12-11 12:27:28 +08:00
|
|
|
// RUN: echo '// Foo.h' > %t/i/Foo.framework/Headers/Foo.h
|
2018-06-22 17:46:40 +08:00
|
|
|
// RUN: %hmaptool write %S/../Preprocessor/Inputs/headermap-rel/foo.hmap.json %t/i/foo.hmap
|
2016-12-11 12:27:28 +08:00
|
|
|
|
2019-10-14 09:41:56 +08:00
|
|
|
// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
|
|
|
|
// RUN: not %clang -fsyntax-only -fmodules -fmodules-cache-path=%t/m %s \
|
2016-12-11 12:27:28 +08:00
|
|
|
// RUN: -I %t/i/foo.hmap -F %t/i 2>&1 | FileCheck %s
|
|
|
|
|
|
|
|
// RUN: FileCheck --check-prefix=CHECKSH %s -input-file %t/crash-vfs-*.sh
|
|
|
|
// RUN: FileCheck --check-prefix=CHECKYAML %s -input-file \
|
|
|
|
// RUN: %t/crash-vfs-*.cache/vfs/vfs.yaml
|
|
|
|
|
|
|
|
#include "Foo.h"
|
|
|
|
#include "Foo.h"
|
|
|
|
|
|
|
|
// CHECK: Preprocessed source(s) and associated run script(s) are located at:
|
|
|
|
// CHECK-NEXT: note: diagnostic msg: {{.*}}.m
|
|
|
|
// CHECK-NEXT: note: diagnostic msg: {{.*}}.cache
|
|
|
|
|
|
|
|
// CHECKSH: # Crash reproducer
|
|
|
|
// CHECKSH-NEXT: # Driver args: "-fsyntax-only"
|
|
|
|
// CHECKSH-NEXT: # Original command: {{.*$}}
|
|
|
|
// CHECKSH-NEXT: "-cc1"
|
|
|
|
// CHECKSH: "-I" "/[[INCPATH:.*]]/foo.hmap"
|
|
|
|
// CHECKSH: "crash-vfs-{{[^ ]*}}.m"
|
|
|
|
// CHECKSH: "-ivfsoverlay" "crash-vfs-{{[^ ]*}}.cache/vfs/vfs.yaml"
|
|
|
|
// CHECKSH: "-fmodules-cache-path=crash-vfs-{{[^ ]*}}.cache/repro-modules"
|
|
|
|
|
|
|
|
// CHECKYAML: 'case-sensitive':
|
|
|
|
// CHECKYAML-NEXT: 'use-external-names': 'false',
|
|
|
|
// CHECKYAML-NEXT: 'overlay-relative': 'true',
|
|
|
|
// CHECKYAML: 'type': 'directory'
|
2016-12-11 12:27:31 +08:00
|
|
|
// CHECKYAML: 'name': "/[[PATH:.*]]/Foo.framework/Headers",
|
|
|
|
// CHECKYAML-NEXT: 'contents': [
|
|
|
|
// CHECKYAML-NEXT: {
|
|
|
|
// CHECKYAML-NEXT: 'type': 'file',
|
|
|
|
// CHECKYAML-NEXT: 'name': "Foo.h",
|
|
|
|
// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/Foo.framework/Headers/Foo.h"
|
|
|
|
// CHECKYAML: 'type': 'directory'
|
2016-12-11 12:27:28 +08:00
|
|
|
// CHECKYAML: 'name': "/[[PATH:.*]]/i",
|
|
|
|
// CHECKYAML-NEXT: 'contents': [
|
|
|
|
// CHECKYAML-NEXT: {
|
|
|
|
// CHECKYAML-NEXT: 'type': 'file',
|
|
|
|
// CHECKYAML-NEXT: 'name': "foo.hmap",
|
|
|
|
// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/i/foo.hmap"
|