20 lines · c
1// RUN: rm -rf %t2// RUN: split-file %s %t3 4// This test checks that headers that are part of a module named by5// -fmodule-name= don't get included again if previously included from a PCH.6 7//--- include/module.modulemap8module Mod { header "Mod.h" }9//--- include/Mod.h10struct Symbol {};11//--- pch.h12#import "Mod.h"13//--- tu.c14#import "Mod.h" // expected-no-diagnostics15 16// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/cache -fimplicit-module-maps -fmodule-name=Mod -I %t/include \17// RUN: -emit-pch -x c-header %t/pch.h -o %t/pch.pch18// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/cache -fimplicit-module-maps -fmodule-name=Mod -I %t/include \19// RUN: -fsyntax-only %t/tu.c -include-pch %t/pch.pch -verify20