// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -E -o %t/diamond.mi -frewrite-imports
// RUN: FileCheck %s --input-file %t/diamond.mi
// RUN: %clang_cc1 -fmodules %t/diamond.mi -I. -verify
// CHECK: {{^}}#pragma clang module build diamond_top
// CHECK: {{^}}module diamond_top {
// CHECK: {{^}}#pragma clang module contents
// FIXME: @import does not work under -frewrite-includes / -frewrite-imports
// because we disable it when macro expansion is disabled.
// expected-no-diagnostics
void