xref: /minix3/external/bsd/llvm/dist/clang/test/Index/pch-depending-on-deleted-module.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc #include "a.h"
2*0a6a1f1dSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc // RUN: rm -rf %t
4*0a6a1f1dSLionel Sambuc // RUN: mkdir %t
5*0a6a1f1dSLionel Sambuc 
6*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -x c-header -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -emit-pch -I %S/Inputs/Headers -o %t/use_LibA.pch %s
7*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -I %S/Inputs/Headers -verify-pch %t/use_LibA.pch
8*0a6a1f1dSLionel Sambuc // RUN: rm -f %t/modules-cache/LibA.pcm
9*0a6a1f1dSLionel Sambuc // RUN: not %clang_cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -I %S/Inputs/Headers -verify-pch %t/use_LibA.pch 2>&1 | FileCheck -check-prefix=VERIFY %s
10*0a6a1f1dSLionel Sambuc // RUN: not c-index-test -test-load-source all -x c -fmodules -Xclang -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -I %S/Inputs/Headers -include-pch %t/use_LibA.pch %s 2>&1 | FileCheck -check-prefix=INDEX %s
11*0a6a1f1dSLionel Sambuc 
12*0a6a1f1dSLionel Sambuc // VERIFY: fatal error: malformed or corrupted AST file: 'Unable to load module
13*0a6a1f1dSLionel Sambuc // INDEX: {{^}}Failure: AST deserialization error occurred{{$}}
14*0a6a1f1dSLionel Sambuc 
15