brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · f4e6c86 Raw
38 lines · c
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: sed -e "s@NAME_DIR@%{/t:regex_replacement}/A@g" -e "s@EXTERNAL_DIR@%{/t:regex_replacement}/B@g" -e "s@REDIRECT_WITH@fallthrough@g" %t/vfs/base.yaml > %t/vfs/a-b-ft.yaml4// RUN: sed -e "s@NAME_DIR@%{/t:regex_replacement}/A@g" -e "s@EXTERNAL_DIR@%{/t:regex_replacement}/B@g" -e "s@REDIRECT_WITH@fallback@g" %t/vfs/base.yaml > %t/vfs/a-b-fb.yaml5 6// Check that the external name is given when multiple overlays are provided7 8// RUN: %clang_cc1 -Werror -I %t/A -ivfsoverlay %t/vfs/a-b-ft.yaml -ivfsoverlay %t/vfs/empty.yaml -E -C %t/main.c 2>&1 | FileCheck --check-prefix=FROM_B %s9// RUN: %clang_cc1 -Werror -I %t/A -ivfsoverlay %t/vfs/a-b-fb.yaml -ivfsoverlay %t/vfs/empty.yaml -E -C %t/main.c 2>&1 | FileCheck --check-prefix=FROM_B %s10// RUN: %clang_cc1 -Werror -I %t/B -ivfsoverlay %t/vfs/a-b-ft.yaml -ivfsoverlay %t/vfs/empty.yaml -E -C %t/main.c 2>&1 | FileCheck --check-prefix=FROM_B %s11// RUN: %clang_cc1 -Werror -I %t/B -ivfsoverlay %t/vfs/a-b-fb.yaml -ivfsoverlay %t/vfs/empty.yaml -E -C %t/main.c 2>&1 | FileCheck --check-prefix=FROM_B %s12// FROM_B: # 1 "{{.*(/|\\\\)B(/|\\\\)}}Header.h"13// FROM_B: // Header.h in B14 15//--- main.c16#include "Header.h"17 18//--- B/Header.h19// Header.h in B20 21//--- vfs/base.yaml22{23  'version': 0,24  'redirecting-with': 'REDIRECT_WITH',25  'roots': [26    { 'name': 'NAME_DIR',27      'type': 'directory-remap',28      'external-contents': 'EXTERNAL_DIR'29    }30  ]31}32 33//--- vfs/empty.yaml34{35  'version': 0,36  'roots': []37}38