Add an experimental flag -fauto-module-import that automatically turns
#include or #import direcctives of framework headers into module imports of the corresponding framework module. llvm-svn: 139860
This commit is contained in:
@@ -710,6 +710,10 @@ void clang::InitializePreprocessor(Preprocessor &PP,
|
||||
InitializeFileRemapping(PP.getDiagnostics(), PP.getSourceManager(),
|
||||
PP.getFileManager(), InitOpts);
|
||||
|
||||
// Specify whether the preprocessor should replace #include/#import with
|
||||
// module imports when plausible.
|
||||
PP.setAutoModuleImport(InitOpts.AutoModuleImport);
|
||||
|
||||
// Emit line markers for various builtin sections of the file. We don't do
|
||||
// this in asm preprocessor mode, because "# 4" is not a line marker directive
|
||||
// in this mode.
|
||||
@@ -783,7 +787,7 @@ void clang::InitializePreprocessor(Preprocessor &PP,
|
||||
|
||||
// Copy PredefinedBuffer into the Preprocessor.
|
||||
PP.setPredefines(Predefines.str());
|
||||
|
||||
|
||||
// Initialize the header search object.
|
||||
ApplyHeaderSearchOptions(PP.getHeaderSearchInfo(), HSOpts,
|
||||
PP.getLangOptions(),
|
||||
|
||||
Reference in New Issue
Block a user