| 1 |
// This test checks that the OpenMP host IR file goes through VFS overlays. |
| 2 |
|
| 3 |
// RUN: rm -rf %t |
| 4 |
// RUN: split-file %s %t |
| 5 |
|
| 6 |
// RUN: sed -e "s|DIR|%/t|g" %t/vfs.json.in > %t/vfs.json |
| 7 |
// RUN: %clang_cc1 -fopenmp-simd -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %t/host.c -o %t/host.bc |
| 8 |
|
| 9 |
// RUN: %clang_cc1 -fopenmp-simd -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %t/device.c -o - \ |
| 10 |
// RUN: -fopenmp-is-target-device -fopenmp-host-ir-file-path %t/virtual/host.bc -ivfsoverlay %t/vfs.json -verify |
| 11 |
|
| 12 |
//--- vfs.json.in |
| 13 |
{ |
| 14 |
'version': 0, |
| 15 |
'use-external-names': true, |
| 16 |
'roots': [ |
| 17 |
{ |
| 18 |
'name': 'DIR/virtual', |
| 19 |
'type': 'directory', |
| 20 |
'contents': [ |
| 21 |
{ |
| 22 |
'name': 'host.bc', |
| 23 |
'type': 'file', |
| 24 |
'external-contents': 'DIR/host.bc' |
| 25 |
} |
| 26 |
] |
| 27 |
} |
| 28 |
] |
| 29 |
} |
| 30 |
|
| 31 |
//--- host.c |
| 32 |
//--- device.c |
| 33 |
// expected-no-diagnostics |