forked from OSchip/llvm-project
Inferred framework modules automatically export anything they import
(i.e., 'export *'), to better match the semantics of headers. llvm-svn: 145813
This commit is contained in:
parent
8c7c83522b
commit
d8bd7537ec
|
@ -197,9 +197,14 @@ ModuleMap::inferFrameworkModule(StringRef ModuleName,
|
|||
|
||||
Module *Result = new Module(ModuleName, SourceLocation(),
|
||||
/*IsFramework=*/true);
|
||||
// umbrella "umbrella-header-name"
|
||||
Result->UmbrellaHeader = UmbrellaHeader;
|
||||
Headers[UmbrellaHeader] = Result;
|
||||
UmbrellaDirs[FrameworkDir] = Result;
|
||||
|
||||
// export *
|
||||
Result->Exports.push_back(Module::ExportDecl(0, true));
|
||||
|
||||
Modules[ModuleName] = Result;
|
||||
return Result;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
#import <Module/Module.h> // expected-warning{{treating #import as an import of module 'Module'}}
|
||||
|
|
@ -12,3 +12,8 @@
|
|||
# error DEPENDS_ON_MODULE should have been hidden
|
||||
#endif
|
||||
|
||||
Module *mod; // expected-error{{unknown type name 'Module'}}
|
||||
|
||||
#import <AlsoDependsOnModule/AlsoDependsOnModule.h> // expected-warning{{treating #import as an import of module 'AlsoDependsOnModule'}}
|
||||
Module *mod2;
|
||||
|
||||
|
|
Loading…
Reference in New Issue