brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.4 KiB · f4e77bd Raw
87 lines · plain
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: sed -e "s;TEST_DIR;%/t;g" %t/sed-overlay.yaml > %t/overlay.yaml4 5// These tests first build with an overlay such that the header is resolved6// to %t/other/Mismatch.h. They then build again with the header resolved7// to the one in their directory.8//9// This should cause a rebuild if the contents is different (and thus multiple10// PCMs), but this currently isn't the case. We should at least not error,11// since this does happen in real projects (with a different copy of the same12// file).13 14// RUN: %clang_cc1 -Werror -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/hf-mcp -ivfsoverlay %t/overlay.yaml -F %t/header-frameworks -fsyntax-only -verify %t/use.m15// RUN: %clang_cc1 -Werror -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/hf-mcp -F %t/header-frameworks -fsyntax-only -verify %t/use.m16// RUN: find %t/hf-mcp -name "Mismatch-*.pcm" | count 117 18// RUN: %clang_cc1 -Werror -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/df-mcp -ivfsoverlay %t/overlay.yaml -F %t/dir-frameworks -fsyntax-only -verify %t/use.m19// RUN: %clang_cc1 -Werror -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/hf-mcp -F %t/dir-frameworks -fsyntax-only -verify %t/use.m20// RUN: find %t/df-mcp -name "Mismatch-*.pcm" | count 121 22// RUN: %clang_cc1 -Werror -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/nf-mcp -ivfsoverlay %t/overlay.yaml -F %t/norm-frameworks -fsyntax-only -verify %t/use.m23// RUN: %clang_cc1 -Werror -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/nf-mcp -F %t/norm-frameworks -fsyntax-only -verify %t/use.m24// RUN: find %t/nf-mcp -name "Mismatch-*.pcm" | count 125 26// RUN: %clang_cc1 -Werror -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/m-mcp -ivfsoverlay %t/overlay.yaml -I %t/mod -fsyntax-only -verify %t/use.m27// RUN: %clang_cc1 -Werror -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/m-mcp -I %t/mod -fsyntax-only -verify %t/use.m28// RUN: find %t/m-mcp -name "Mismatch-*.pcm" | count 129 30//--- use.m31// expected-no-diagnostics32@import Mismatch;33 34//--- header-frameworks/Mismatch.framework/Modules/module.modulemap35framework module Mismatch {36  umbrella header "Mismatch.h"37}38//--- header-frameworks/Mismatch.framework/Headers/Mismatch.h39 40//--- dir-frameworks/Mismatch.framework/Modules/module.modulemap41framework module Mismatch {42  umbrella "someheaders"43}44//--- dir-frameworks/Mismatch.framework/someheaders/Mismatch.h45 46//--- norm-frameworks/Mismatch.framework/Modules/module.modulemap47framework module Mismatch {48  header "Mismatch.h"49}50//--- norm-frameworks/Mismatch.framework/Headers/Mismatch.h51 52//--- mod/module.modulemap53module Mismatch {54  umbrella header "Mismatch.h"55}56//--- mod/Mismatch.h57 58//--- other/Mismatch.h59 60//--- sed-overlay.yaml61{62  'version': 0,63  'roots': [64    { 'name': 'TEST_DIR', 'type': 'directory',65      'contents': [66        { 'name': 'header-frameworks/Mismatch.framework/Headers/Mismatch.h',67          'type': 'file',68          'external-contents': 'TEST_DIR/other/Mismatch.h'69        },70        { 'name': 'dir-frameworks/Mismatch.framework/someheaders',71          'type': 'directory',72          'external-contents': 'TEST_DIR/others'73        },74        { 'name': 'norm-frameworks/Mismatch.framework/Headers/Mismatch.h',75          'type': 'file',76          'external-contents': 'TEST_DIR/other/Mismatch.h'77        },78        { 'name': 'mod/Mismatch.h',79          'type': 'file',80          'external-contents': 'TEST_DIR/other/Mismatch.h'81        }82      ]83    }84  ]85}86 87