// UNSUPPORTED: -zos, -aix
// RUN: rm -rf %t
// RUN: split-file %s %t
// RUN: %clang_cc1 -fsyntax-only -F%t/Frameworks %t/test.m -Wno-objc-property-implementation -Wno-incomplete-implementation \
// RUN: -fmodules -fmodule-name=Target -fimplicit-module-maps -fmodules-cache-path=%t/modules.cache
// RUN: %clang_cc1 -fsyntax-only -F%t/Frameworks -x objective-c++ %t/test.m -Wno-objc-property-implementation -Wno-incomplete-implementation \
// RUN: -fmodules -fmodule-name=Target -fimplicit-module-maps -fmodules-cache-path=%t/modules.cache
// Test anonymous TagDecl inside Objective-C interfaces are merged and ivars with these anonymous types are merged too.
//--- Frameworks/Foundation.framework/Headers/Foundation.h
//--- Frameworks/Foundation.framework/Modules/module.modulemap
framework module Foundation
//--- Frameworks/Target.framework/Headers/Target.h
//--- Frameworks/Target.framework/Modules/module.modulemap
framework module Target
//--- Frameworks/Redirect.framework/Headers/Redirect.h
//--- Frameworks/Redirect.framework/Modules/module.modulemap
framework module Redirect
//--- test.m
// At first import everything as non-modular.
// And now as modular to merge same entities obtained through different sources.
// Non-modular import is achieved through using the same name (-fmodule-name) as the imported framework module.
void