diff options
Diffstat (limited to 'include/clang/Basic/Module.h')
-rw-r--r-- | include/clang/Basic/Module.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/include/clang/Basic/Module.h b/include/clang/Basic/Module.h index 02a4ef610b..d632fe095c 100644 --- a/include/clang/Basic/Module.h +++ b/include/clang/Basic/Module.h @@ -1,9 +1,8 @@ //===- Module.h - Describe a module -----------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -78,9 +77,11 @@ public: /// This is a C++ Modules TS module interface unit. ModuleInterfaceUnit, - /// This is a fragment of the global module within some C++ Modules - /// TS module. + /// This is a fragment of the global module within some C++ module. GlobalModuleFragment, + + /// This is the private module fragment within some C++ module. + PrivateModuleFragment, }; /// The kind of this module. @@ -112,6 +113,11 @@ public: /// eventually be exposed, for use in "private" modules. std::string ExportAsModule; + /// Does this Module scope describe part of the purview of a named C++ module? + bool isModulePurview() const { + return Kind == ModuleInterfaceUnit || Kind == PrivateModuleFragment; + } + private: /// The submodules of this module, indexed by name. std::vector<Module *> SubModules; |