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