This patch enables inferring framework modules in explicit builds in all contexts. Until now, inferring framework modules only worked with `-fimplicit-module-maps` due to this block of code:
```
// HeaderSearch::loadFrameworkModule
case LMM_InvalidModuleMap:
// Try to infer a module map from the framework directory.
if (HSOpts->ImplicitModuleMaps)
ModMap.inferFrameworkModule(Dir, IsSystem, /*Parent=*/nullptr);
break;
```
Reviewed By: Bigcheese
Differential Revision: https://reviews.llvm.org/D113880
13 lines
490 B
C++
13 lines
490 B
C++
// RUN: rm -rf %t && mkdir %t
|
|
//
|
|
// RUN: %clang_cc1 -fmodules -fno-implicit-modules \
|
|
// RUN: -emit-module -x c++ %S/Inputs/explicit-build-inferred/frameworks/module.modulemap \
|
|
// RUN: -fmodule-name=Inferred -o %t/Inferred.pcm -F %S/Inputs/explicit-build-inferred/frameworks
|
|
//
|
|
// RUN: %clang_cc1 -fmodules -fno-implicit-modules -fsyntax-only %s \
|
|
// RUN: -fmodule-file=%t/Inferred.pcm -F %S/Inputs/explicit-build-inferred/frameworks
|
|
|
|
#include <Inferred/Inferred.h>
|
|
|
|
inferred a = 0;
|