forked from OSchip/llvm-project
Revert "[Modules] Prevent #import to reenter header if not building a module."
This reverts commit r310605. Richard pointed out a better way to achieve this, which I'll post a patch for soon. llvm-svn: 310775
This commit is contained in:
parent
3e78c4bddc
commit
4164dd9167
|
@ -1143,7 +1143,7 @@ bool HeaderSearch::ShouldEnterIncludeFile(Preprocessor &PP,
|
|||
// headers find in the wild might rely only on #import and do not contain
|
||||
// controlling macros, be conservative and only try to enter textual headers
|
||||
// if such macro is present.
|
||||
if (FileInfo.isCompilingModuleHeader && !FileInfo.isModuleHeader &&
|
||||
if (!FileInfo.isModuleHeader &&
|
||||
FileInfo.getControllingMacro(ExternalLookup))
|
||||
TryEnterHdr = true;
|
||||
return TryEnterHdr;
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
#ifndef RANDOM_DEP
|
||||
|
||||
@interface X
|
||||
@end
|
||||
|
||||
#endif // RANDOM_DEP
|
|
@ -1,8 +0,0 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -fsyntax-only -fmodules -fimplicit-module-maps -I%S/Inputs/import-textual -fmodules-cache-path=%t %s -verify
|
||||
|
||||
// expected-no-diagnostics
|
||||
|
||||
#import "x.h"
|
||||
#import "x.h"
|
||||
|
Loading…
Reference in New Issue