diff options
Diffstat (limited to 'include/clang/Basic')
-rw-r--r-- | include/clang/Basic/DiagnosticLexKinds.td | 5 | ||||
-rw-r--r-- | include/clang/Basic/Module.h | 9 | ||||
-rw-r--r-- | include/clang/Basic/SourceManager.h | 5 |
3 files changed, 15 insertions, 4 deletions
diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td index 936a72e8e7..3a564c4aa8 100644 --- a/include/clang/Basic/DiagnosticLexKinds.td +++ b/include/clang/Basic/DiagnosticLexKinds.td @@ -391,6 +391,8 @@ def err_mmap_expected_module_name : Error<"expected module name">; def err_mmap_expected_lbrace : Error<"expected '{' to start module '%0'">; def err_mmap_expected_rbrace : Error<"expected '}'">; def note_mmap_lbrace_match : Note<"to match this '{'">; +def err_mmap_expected_rsquare : Error<"expected ']' to close attribute">; +def note_mmap_lsquare_match : Note<"to match this ']'">; def err_mmap_expected_member : Error< "expected umbrella, header, submodule, or module export">; def err_mmap_expected_header : Error<"expected a header name after '%0'">; @@ -429,6 +431,9 @@ def err_mmap_explicit_top_level : Error< def err_mmap_nested_submodule_id : Error< "qualified module name can only be used to define modules at the top level">; def err_mmap_expected_feature : Error<"expected a feature name">; +def err_mmap_expected_attribute : Error<"expected an attribute name">; +def warn_mmap_unknown_attribute : Warning<"unknown attribute '%0'">, + InGroup<IgnoredAttributes>; def warn_auto_module_import : Warning< "treating #%select{include|import|include_next|__include_macros}0 as an " diff --git a/include/clang/Basic/Module.h b/include/clang/Basic/Module.h index 19292950f5..e75f43e0e9 100644 --- a/include/clang/Basic/Module.h +++ b/include/clang/Basic/Module.h @@ -86,6 +86,10 @@ public: /// \brief Whether this is an explicit submodule. unsigned IsExplicit : 1; + /// \brief Whether this is a "system" module (which assumes that all + /// headers in it are system headers). + unsigned IsSystem : 1; + /// \brief Whether we should infer submodules for this module based on /// the headers. /// @@ -154,10 +158,11 @@ public: bool IsFramework) : Name(Name), DefinitionLoc(DefinitionLoc), Parent(0), Umbrella(), IsAvailable(true), IsFromModuleFile(false), IsFramework(IsFramework), - IsExplicit(false), InferSubmodules(false), InferExplicitSubmodules(false), + IsExplicit(false), IsSystem(false), + InferSubmodules(false), InferExplicitSubmodules(false), InferExportWildcard(false), NameVisibility(Hidden) { } - /// \brief Construct a new module or submodule. + /// \brief Construct a new module or submodule. Module(StringRef Name, SourceLocation DefinitionLoc, Module *Parent, bool IsFramework, bool IsExplicit); diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index 038b8c65d0..848ae70308 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -618,9 +618,10 @@ public: FileID getMainFileID() const { return MainFileID; } /// createMainFileID - Create the FileID for the main source file. - FileID createMainFileID(const FileEntry *SourceFile) { + FileID createMainFileID(const FileEntry *SourceFile, + SrcMgr::CharacteristicKind Kind = SrcMgr::C_User) { assert(MainFileID.isInvalid() && "MainFileID already set!"); - MainFileID = createFileID(SourceFile, SourceLocation(), SrcMgr::C_User); + MainFileID = createFileID(SourceFile, SourceLocation(), Kind); return MainFileID; } |