1*9880d681SAndroid Build Coastguard Worker/* Compile with: 2*9880d681SAndroid Build Coastguard Worker cat >modules.modulemap <<EOF 3*9880d681SAndroid Build Coastguard Worker module mismatch { 4*9880d681SAndroid Build Coastguard Worker header "mismatch.h" 5*9880d681SAndroid Build Coastguard Worker } 6*9880d681SAndroid Build Coastguard Worker EOF 7*9880d681SAndroid Build Coastguard Worker echo "struct s;"> mismatch.h 8*9880d681SAndroid Build Coastguard Worker clang -cc1 -emit-obj -fmodules -fmodule-map-file=modules.modulemap \ 9*9880d681SAndroid Build Coastguard Worker -fmodule-format=obj -g -dwarf-ext-refs -fmodules-cache-path=. \ 10*9880d681SAndroid Build Coastguard Worker -fdisable-module-hash mismatch.m -o 1.o 11*9880d681SAndroid Build Coastguard Worker echo > mismatch.h 12*9880d681SAndroid Build Coastguard Worker clang -cc1 -emit-obj -fmodules -fmodule-map-file=modules.modulemap \ 13*9880d681SAndroid Build Coastguard Worker -fmodule-format=obj -g -dwarf-ext-refs -fmodules-cache-path=. \ 14*9880d681SAndroid Build Coastguard Worker -fdisable-module-hash mismatch.m -o /dev/null 15*9880d681SAndroid Build Coastguard Worker*/ 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Worker// RUN: rm -rf %t.dir && mkdir %t.dir 18*9880d681SAndroid Build Coastguard Worker// RUN: cp %p/../Inputs/mismatch/1.o %p/../Inputs/mismatch/mismatch.pcm %t.dir 19*9880d681SAndroid Build Coastguard Worker// RUN: cp %p/../Inputs/mismatch/1.o %t.dir/2.o 20*9880d681SAndroid Build Coastguard Worker// RUN: llvm-dsymutil --verbose -f -oso-prepend-path=%t.dir \ 21*9880d681SAndroid Build Coastguard Worker// RUN: -y %p/dummy-debug-map.map -o %t.bin 2>&1 | FileCheck %s 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Worker@import mismatch; 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Workervoid f() {} 26*9880d681SAndroid Build Coastguard Worker// Mismatch after importing the module. 27*9880d681SAndroid Build Coastguard Worker// CHECK: warning: hash mismatch 28*9880d681SAndroid Build Coastguard Worker// Mismatch in the cache. 29*9880d681SAndroid Build Coastguard Worker// CHECK: warning: hash mismatch 30*9880d681SAndroid Build Coastguard Worker// CHECK: cached 31