blob: 2ea157b934c0bceb3f1818b64d29d580035b4cb7 [file] [log] [blame]
Richard Smith0f99d6a2015-08-09 08:48:41 +00001// RUN: rm -rf %t
2// RUN: mkdir %t
3// RUN: echo 'extern int a;' > %t/a.h
4// RUN: echo 'extern int b;' > %t/b.h
5// RUN: echo 'module a { header "a.h" header "b.h" }' > %t/modulemap
6
7// We lazily check that the files referenced by an explicitly-specified .pcm
8// file exist. Test this by removing files and ensuring that the compilation
9// still succeeds.
10//
11// RUN: %clang_cc1 -fmodules -I %t -emit-module -fmodule-name=a -x c++ %t/modulemap -o %t/a.pcm
12// RUN: %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm %s
13// RUN: rm %t/modulemap
14// RUN: %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm %s
15// RUN: rm %t/b.h
16// RUN: %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm %s
17// RUN: rm %t/a.h
18// RUN: %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm %s -verify
19
20#include "a.h" // expected-error {{file not found}}
21int x = b;