clang  16.0.0git
Module.h
Go to the documentation of this file.
1 //===- Module.h - Describe a module -----------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 /// \file
10 /// Defines the clang::Module class, which describes a module in the
11 /// source code.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_CLANG_BASIC_MODULE_H
16 #define LLVM_CLANG_BASIC_MODULE_H
17 
19 #include "clang/Basic/FileEntry.h"
21 #include "llvm/ADT/ArrayRef.h"
22 #include "llvm/ADT/DenseSet.h"
23 #include "llvm/ADT/Optional.h"
24 #include "llvm/ADT/PointerIntPair.h"
25 #include "llvm/ADT/STLExtras.h"
26 #include "llvm/ADT/SetVector.h"
27 #include "llvm/ADT/SmallVector.h"
28 #include "llvm/ADT/StringMap.h"
29 #include "llvm/ADT/StringRef.h"
30 #include "llvm/ADT/iterator_range.h"
31 #include <array>
32 #include <cassert>
33 #include <cstdint>
34 #include <ctime>
35 #include <iterator>
36 #include <string>
37 #include <utility>
38 #include <vector>
39 
40 namespace llvm {
41 
42 class raw_ostream;
43 
44 } // namespace llvm
45 
46 namespace clang {
47 
48 class FileManager;
49 class LangOptions;
50 class TargetInfo;
51 
52 /// Describes the name of a module.
54 
55 /// The signature of a module, which is a hash of the AST content.
56 struct ASTFileSignature : std::array<uint8_t, 20> {
57  using BaseT = std::array<uint8_t, 20>;
58 
59  static constexpr size_t size = std::tuple_size<BaseT>::value;
60 
61  ASTFileSignature(BaseT S = {{0}}) : BaseT(std::move(S)) {}
62 
63  explicit operator bool() const { return *this != BaseT({{0}}); }
64 
65  /// Returns the value truncated to the size of an uint64_t.
67  uint64_t Value = 0;
68  static_assert(sizeof(*this) >= sizeof(uint64_t), "No need to truncate.");
69  for (unsigned I = 0; I < sizeof(uint64_t); ++I)
70  Value |= static_cast<uint64_t>((*this)[I]) << (I * 8);
71  return Value;
72  }
73 
74  static ASTFileSignature create(std::array<uint8_t, 20> Bytes) {
75  return ASTFileSignature(std::move(Bytes));
76  }
77 
79  ASTFileSignature Sentinel;
80  Sentinel.fill(0xFF);
81  return Sentinel;
82  }
83 
84  template <typename InputIt>
85  static ASTFileSignature create(InputIt First, InputIt Last) {
86  assert(std::distance(First, Last) == size &&
87  "Wrong amount of bytes to create an ASTFileSignature");
88 
89  ASTFileSignature Signature;
90  std::copy(First, Last, Signature.begin());
91  return Signature;
92  }
93 };
94 
95 /// Describes a module or submodule.
96 ///
97 /// Aligned to 8 bytes to allow for llvm::PointerIntPair<Module *, 3>.
98 class alignas(8) Module {
99 public:
100  /// The name of this module.
102 
103  /// The location of the module definition.
105 
106  enum ModuleKind {
107  /// This is a module that was defined by a module map and built out
108  /// of header files.
110 
111  /// This is a C++20 module interface unit.
113 
114  /// This is a C++ 20 header unit.
116 
117  /// This is a C++ 20 module partition interface.
119 
120  /// This is a C++ 20 module partition implementation.
122 
123  /// This is a fragment of the global module within some C++ module.
125 
126  /// This is the private module fragment within some C++ module.
128  };
129 
130  /// The kind of this module.
132 
133  /// The parent of this module. This will be NULL for the top-level
134  /// module.
136 
137  /// The build directory of this module. This is the directory in
138  /// which the module is notionally built, and relative to which its headers
139  /// are found.
140  const DirectoryEntry *Directory = nullptr;
141 
142  /// The presumed file name for the module map defining this module.
143  /// Only non-empty when building from preprocessed source.
145 
146  /// The umbrella header or directory.
147  llvm::PointerUnion<const FileEntry *, const DirectoryEntry *> Umbrella;
148 
149  /// The module signature.
151 
152  /// The name of the umbrella entry, as written in the module map.
154 
155  // The path to the umbrella entry relative to the root module's \c Directory.
157 
158  /// The module through which entities defined in this module will
159  /// eventually be exposed, for use in "private" modules.
161 
162  /// Does this Module scope describe part of the purview of a standard named
163  /// C++ module?
164  bool isModulePurview() const {
168  }
169 
170  /// Does this Module scope describe a fragment of the global module within
171  /// some C++ module.
172  bool isGlobalModule() const { return Kind == GlobalModuleFragment; }
173 
174  bool isPrivateModule() const { return Kind == PrivateModuleFragment; }
175 
176  bool isModuleMapModule() const { return Kind == ModuleMapModule; }
177 
178 private:
179  /// The submodules of this module, indexed by name.
180  std::vector<Module *> SubModules;
181 
182  /// A mapping from the submodule name to the index into the
183  /// \c SubModules vector at which that submodule resides.
184  llvm::StringMap<unsigned> SubModuleIndex;
185 
186  /// The AST file if this is a top-level module which has a
187  /// corresponding serialized AST file, or null otherwise.
188  Optional<FileEntryRef> ASTFile;
189 
190  /// The top-level headers associated with this module.
192 
193  /// top-level header filenames that aren't resolved to FileEntries yet.
194  std::vector<std::string> TopHeaderNames;
195 
196  /// Cache of modules visible to lookup in this module.
197  mutable llvm::DenseSet<const Module*> VisibleModulesCache;
198 
199  /// The ID used when referencing this module within a VisibleModuleSet.
200  unsigned VisibilityID;
201 
202 public:
203  enum HeaderKind {
209  };
210  static const int NumHeaderKinds = HK_Excluded + 1;
211 
212  /// Information about a header directive as found in the module map
213  /// file.
214  struct Header {
217  const FileEntry *Entry;
218 
219  explicit operator bool() { return Entry; }
220  };
221 
222  /// Information about a directory name as found in the module map
223  /// file.
224  struct DirectoryName {
228 
229  explicit operator bool() { return Entry; }
230  };
231 
232  /// The headers that are part of this module.
234 
235  /// Stored information about a header directive that was found in the
236  /// module map file but has not been resolved to a file.
241  bool IsUmbrella = false;
242  bool HasBuiltinHeader = false;
245  };
246 
247  /// Headers that are mentioned in the module map file but that we have not
248  /// yet attempted to resolve to a file on the file system.
250 
251  /// Headers that are mentioned in the module map file but could not be
252  /// found on the file system.
254 
255  /// An individual requirement: a feature name and a flag indicating
256  /// the required state of that feature.
257  using Requirement = std::pair<std::string, bool>;
258 
259  /// The set of language features required to use this module.
260  ///
261  /// If any of these requirements are not available, the \c IsAvailable bit
262  /// will be false to indicate that this (sub)module is not available.
264 
265  /// A module with the same name that shadows this module.
267 
268  /// Whether this module has declared itself unimportable, either because
269  /// it's missing a requirement from \p Requirements or because it's been
270  /// shadowed by another module.
271  unsigned IsUnimportable : 1;
272 
273  /// Whether we tried and failed to load a module file for this module.
275 
276  /// Whether this module is available in the current translation unit.
277  ///
278  /// If the module is missing headers or does not meet all requirements then
279  /// this bit will be 0.
280  unsigned IsAvailable : 1;
281 
282  /// Whether this module was loaded from a module file.
283  unsigned IsFromModuleFile : 1;
284 
285  /// Whether this is a framework module.
286  unsigned IsFramework : 1;
287 
288  /// Whether this is an explicit submodule.
289  unsigned IsExplicit : 1;
290 
291  /// Whether this is a "system" module (which assumes that all
292  /// headers in it are system headers).
293  unsigned IsSystem : 1;
294 
295  /// Whether this is an 'extern "C"' module (which implicitly puts all
296  /// headers in it within an 'extern "C"' block, and allows the module to be
297  /// imported within such a block).
298  unsigned IsExternC : 1;
299 
300  /// Whether this is an inferred submodule (module * { ... }).
301  unsigned IsInferred : 1;
302 
303  /// Whether we should infer submodules for this module based on
304  /// the headers.
305  ///
306  /// Submodules can only be inferred for modules with an umbrella header.
307  unsigned InferSubmodules : 1;
308 
309  /// Whether, when inferring submodules, the inferred submodules
310  /// should be explicit.
312 
313  /// Whether, when inferring submodules, the inferr submodules should
314  /// export all modules they import (e.g., the equivalent of "export *").
315  unsigned InferExportWildcard : 1;
316 
317  /// Whether the set of configuration macros is exhaustive.
318  ///
319  /// When the set of configuration macros is exhaustive, meaning
320  /// that no identifier not in this list should affect how the module is
321  /// built.
323 
324  /// Whether files in this module can only include non-modular headers
325  /// and headers from used modules.
326  unsigned NoUndeclaredIncludes : 1;
327 
328  /// Whether this module came from a "private" module map, found next
329  /// to a regular (public) module map.
330  unsigned ModuleMapIsPrivate : 1;
331 
332  /// Describes the visibility of the various names within a
333  /// particular module.
335  /// All of the names in this module are hidden.
337  /// All of the names in this module are visible.
339  };
340 
341  /// The visibility of names within this particular module.
343 
344  /// The location of the inferred submodule.
346 
347  /// The set of modules imported by this module, and on which this
348  /// module depends.
350 
351  /// The set of top-level modules that affected the compilation of this module,
352  /// but were not imported.
354 
355  /// Describes an exported module.
356  ///
357  /// The pointer is the module being re-exported, while the bit will be true
358  /// to indicate that this is a wildcard export.
359  using ExportDecl = llvm::PointerIntPair<Module *, 1, bool>;
360 
361  /// The set of export declarations.
363 
364  /// Describes an exported module that has not yet been resolved
365  /// (perhaps because the module it refers to has not yet been loaded).
367  /// The location of the 'export' keyword in the module map file.
369 
370  /// The name of the module.
372 
373  /// Whether this export declaration ends in a wildcard, indicating
374  /// that all of its submodules should be exported (rather than the named
375  /// module itself).
376  bool Wildcard;
377  };
378 
379  /// The set of export declarations that have yet to be resolved.
381 
382  /// The directly used modules.
384 
385  /// The set of use declarations that have yet to be resolved.
387 
388  /// When \c NoUndeclaredIncludes is true, the set of modules this module tried
389  /// to import but didn't because they are not direct uses.
391 
392  /// A library or framework to link against when an entity from this
393  /// module is used.
394  struct LinkLibrary {
395  LinkLibrary() = default;
398 
399  /// The library to link against.
400  ///
401  /// This will typically be a library or framework name, but can also
402  /// be an absolute path to the library or framework.
404 
405  /// Whether this is a framework rather than a library.
406  bool IsFramework = false;
407  };
408 
409  /// The set of libraries or frameworks to link against when
410  /// an entity from this module is used.
412 
413  /// Autolinking uses the framework name for linking purposes
414  /// when this is false and the export_as name otherwise.
416 
417  /// The set of "configuration macros", which are macros that
418  /// (intentionally) change how this module is built.
419  std::vector<std::string> ConfigMacros;
420 
421  /// An unresolved conflict with another module.
423  /// The (unresolved) module id.
425 
426  /// The message provided to the user when there is a conflict.
428  };
429 
430  /// The list of conflicts for which the module-id has not yet been
431  /// resolved.
432  std::vector<UnresolvedConflict> UnresolvedConflicts;
433 
434  /// A conflict between two modules.
435  struct Conflict {
436  /// The module that this module conflicts with.
438 
439  /// The message provided to the user when there is a conflict.
441  };
442 
443  /// The list of conflicts.
444  std::vector<Conflict> Conflicts;
445 
446  /// Construct a new module or submodule.
448  bool IsFramework, bool IsExplicit, unsigned VisibilityID);
449 
450  ~Module();
451 
452  /// Determine whether this module has been declared unimportable.
453  bool isUnimportable() const { return IsUnimportable; }
454 
455  /// Determine whether this module has been declared unimportable.
456  ///
457  /// \param LangOpts The language options used for the current
458  /// translation unit.
459  ///
460  /// \param Target The target options used for the current translation unit.
461  ///
462  /// \param Req If this module is unimportable because of a missing
463  /// requirement, this parameter will be set to one of the requirements that
464  /// is not met for use of this module.
465  ///
466  /// \param ShadowingModule If this module is unimportable because it is
467  /// shadowed, this parameter will be set to the shadowing module.
468  bool isUnimportable(const LangOptions &LangOpts, const TargetInfo &Target,
469  Requirement &Req, Module *&ShadowingModule) const;
470 
471  /// Determine whether this module is available for use within the
472  /// current translation unit.
473  bool isAvailable() const { return IsAvailable; }
474 
475  /// Determine whether this module is available for use within the
476  /// current translation unit.
477  ///
478  /// \param LangOpts The language options used for the current
479  /// translation unit.
480  ///
481  /// \param Target The target options used for the current translation unit.
482  ///
483  /// \param Req If this module is unavailable because of a missing requirement,
484  /// this parameter will be set to one of the requirements that is not met for
485  /// use of this module.
486  ///
487  /// \param MissingHeader If this module is unavailable because of a missing
488  /// header, this parameter will be set to one of the missing headers.
489  ///
490  /// \param ShadowingModule If this module is unavailable because it is
491  /// shadowed, this parameter will be set to the shadowing module.
492  bool isAvailable(const LangOptions &LangOpts,
493  const TargetInfo &Target,
494  Requirement &Req,
495  UnresolvedHeaderDirective &MissingHeader,
496  Module *&ShadowingModule) const;
497 
498  /// Determine whether this module is a submodule.
499  bool isSubModule() const { return Parent != nullptr; }
500 
501  /// Check if this module is a (possibly transitive) submodule of \p Other.
502  ///
503  /// The 'A is a submodule of B' relation is a partial order based on the
504  /// the parent-child relationship between individual modules.
505  ///
506  /// Returns \c false if \p Other is \c nullptr.
507  bool isSubModuleOf(const Module *Other) const;
508 
509  /// Determine whether this module is a part of a framework,
510  /// either because it is a framework module or because it is a submodule
511  /// of a framework module.
512  bool isPartOfFramework() const {
513  for (const Module *Mod = this; Mod; Mod = Mod->Parent)
514  if (Mod->IsFramework)
515  return true;
516 
517  return false;
518  }
519 
520  /// Determine whether this module is a subframework of another
521  /// framework.
522  bool isSubFramework() const {
523  return IsFramework && Parent && Parent->isPartOfFramework();
524  }
525 
526  /// Set the parent of this module. This should only be used if the parent
527  /// could not be set during module creation.
528  void setParent(Module *M) {
529  assert(!Parent);
530  Parent = M;
531  Parent->SubModuleIndex[Name] = Parent->SubModules.size();
532  Parent->SubModules.push_back(this);
533  }
534 
535  /// Is this module have similar semantics as headers.
536  bool isHeaderLikeModule() const {
537  return isModuleMapModule() || isHeaderUnit();
538  }
539 
540  /// Is this a module partition.
541  bool isModulePartition() const {
542  return Kind == ModulePartitionInterface ||
544  }
545 
546  /// Is this module a header unit.
547  bool isHeaderUnit() const { return Kind == ModuleHeaderUnit; }
548  // Is this a C++20 module interface or a partition.
549  bool isInterfaceOrPartition() const {
551  }
552 
553  bool isModuleInterfaceUnit() const {
555  }
556 
557  /// Get the primary module interface name from a partition.
558  StringRef getPrimaryModuleInterfaceName() const {
559  // Technically, global module fragment belongs to global module. And global
560  // module has no name: [module.unit]p6:
561  // The global module has no name, no module interface unit, and is not
562  // introduced by any module-declaration.
563  //
564  // <global> is the default name showed in module map.
565  if (isGlobalModule())
566  return "<global>";
567 
568  if (isModulePartition()) {
569  auto pos = Name.find(':');
570  return StringRef(Name.data(), pos);
571  }
572 
573  if (isPrivateModule())
574  return getTopLevelModuleName();
575 
576  return Name;
577  }
578 
579  /// Retrieve the full name of this module, including the path from
580  /// its top-level module.
581  /// \param AllowStringLiterals If \c true, components that might not be
582  /// lexically valid as identifiers will be emitted as string literals.
583  std::string getFullModuleName(bool AllowStringLiterals = false) const;
584 
585  /// Whether the full name of this module is equal to joining
586  /// \p nameParts with "."s.
587  ///
588  /// This is more efficient than getFullModuleName().
589  bool fullModuleNameIs(ArrayRef<StringRef> nameParts) const;
590 
591  /// Retrieve the top-level module for this (sub)module, which may
592  /// be this module.
594  return const_cast<Module *>(
595  const_cast<const Module *>(this)->getTopLevelModule());
596  }
597 
598  /// Retrieve the top-level module for this (sub)module, which may
599  /// be this module.
600  const Module *getTopLevelModule() const;
601 
602  /// Retrieve the name of the top-level module.
603  StringRef getTopLevelModuleName() const {
604  return getTopLevelModule()->Name;
605  }
606 
607  /// The serialized AST file for this module, if one was created.
609  return getTopLevelModule()->ASTFile;
610  }
611 
612  /// Set the serialized AST file for the top-level module of this module.
614  assert((!getASTFile() || getASTFile() == File) && "file path changed");
615  getTopLevelModule()->ASTFile = File;
616  }
617 
618  /// Retrieve the directory for which this module serves as the
619  /// umbrella.
620  DirectoryName getUmbrellaDir() const;
621 
622  /// Retrieve the header that serves as the umbrella header for this
623  /// module.
625  if (auto *FE = Umbrella.dyn_cast<const FileEntry *>())
627  FE};
628  return Header{};
629  }
630 
631  /// Determine whether this module has an umbrella directory that is
632  /// not based on an umbrella header.
633  bool hasUmbrellaDir() const {
634  return Umbrella && Umbrella.is<const DirectoryEntry *>();
635  }
636 
637  /// Add a top-level header associated with this module.
638  void addTopHeader(const FileEntry *File);
639 
640  /// Add a top-level header filename associated with this module.
641  void addTopHeaderFilename(StringRef Filename) {
642  TopHeaderNames.push_back(std::string(Filename));
643  }
644 
645  /// The top-level headers associated with this module.
647 
648  /// Determine whether this module has declared its intention to
649  /// directly use another module.
650  bool directlyUses(const Module *Requested);
651 
652  /// Add the given feature requirement to the list of features
653  /// required by this module.
654  ///
655  /// \param Feature The feature that is required by this module (and
656  /// its submodules).
657  ///
658  /// \param RequiredState The required state of this feature: \c true
659  /// if it must be present, \c false if it must be absent.
660  ///
661  /// \param LangOpts The set of language options that will be used to
662  /// evaluate the availability of this feature.
663  ///
664  /// \param Target The target options that will be used to evaluate the
665  /// availability of this feature.
666  void addRequirement(StringRef Feature, bool RequiredState,
667  const LangOptions &LangOpts,
668  const TargetInfo &Target);
669 
670  /// Mark this module and all of its submodules as unavailable.
671  void markUnavailable(bool Unimportable);
672 
673  /// Find the submodule with the given name.
674  ///
675  /// \returns The submodule if found, or NULL otherwise.
676  Module *findSubmodule(StringRef Name) const;
677  Module *findOrInferSubmodule(StringRef Name);
678 
679  /// Get the Global Module Fragment (sub-module) for this module, it there is
680  /// one.
681  ///
682  /// \returns The GMF sub-module if found, or NULL otherwise.
683  Module *getGlobalModuleFragment() { return findSubmodule("<global>"); }
684 
685  /// Get the Private Module Fragment (sub-module) for this module, it there is
686  /// one.
687  ///
688  /// \returns The PMF sub-module if found, or NULL otherwise.
689  Module *getPrivateModuleFragment() { return findSubmodule("<private>"); }
690 
691  /// Determine whether the specified module would be visible to
692  /// a lookup at the end of this module.
693  ///
694  /// FIXME: This may return incorrect results for (submodules of) the
695  /// module currently being built, if it's queried before we see all
696  /// of its imports.
697  bool isModuleVisible(const Module *M) const {
698  if (VisibleModulesCache.empty())
699  buildVisibleModulesCache();
700  return VisibleModulesCache.count(M);
701  }
702 
703  unsigned getVisibilityID() const { return VisibilityID; }
704 
705  using submodule_iterator = std::vector<Module *>::iterator;
706  using submodule_const_iterator = std::vector<Module *>::const_iterator;
707 
708  submodule_iterator submodule_begin() { return SubModules.begin(); }
709  submodule_const_iterator submodule_begin() const {return SubModules.begin();}
710  submodule_iterator submodule_end() { return SubModules.end(); }
711  submodule_const_iterator submodule_end() const { return SubModules.end(); }
712 
713  llvm::iterator_range<submodule_iterator> submodules() {
714  return llvm::make_range(submodule_begin(), submodule_end());
715  }
716  llvm::iterator_range<submodule_const_iterator> submodules() const {
717  return llvm::make_range(submodule_begin(), submodule_end());
718  }
719 
720  /// Appends this module's list of exported modules to \p Exported.
721  ///
722  /// This provides a subset of immediately imported modules (the ones that are
723  /// directly exported), not the complete set of exported modules.
724  void getExportedModules(SmallVectorImpl<Module *> &Exported) const;
725 
726  static StringRef getModuleInputBufferName() {
727  return "<module-includes>";
728  }
729 
730  /// Print the module map for this module to the given stream.
731  void print(raw_ostream &OS, unsigned Indent = 0, bool Dump = false) const;
732 
733  /// Dump the contents of this module to the given output stream.
734  void dump() const;
735 
736 private:
737  void buildVisibleModulesCache() const;
738 };
739 
740 /// A set of visible modules.
742 public:
743  VisibleModuleSet() = default;
745  : ImportLocs(std::move(O.ImportLocs)), Generation(O.Generation ? 1 : 0) {
746  O.ImportLocs.clear();
747  ++O.Generation;
748  }
749 
750  /// Move from another visible modules set. Guaranteed to leave the source
751  /// empty and bump the generation on both.
753  ImportLocs = std::move(O.ImportLocs);
754  O.ImportLocs.clear();
755  ++O.Generation;
756  ++Generation;
757  return *this;
758  }
759 
760  /// Get the current visibility generation. Incremented each time the
761  /// set of visible modules changes in any way.
762  unsigned getGeneration() const { return Generation; }
763 
764  /// Determine whether a module is visible.
765  bool isVisible(const Module *M) const {
766  return getImportLoc(M).isValid();
767  }
768 
769  /// Get the location at which the import of a module was triggered.
771  return M->getVisibilityID() < ImportLocs.size()
772  ? ImportLocs[M->getVisibilityID()]
773  : SourceLocation();
774  }
775 
776  /// A callback to call when a module is made visible (directly or
777  /// indirectly) by a call to \ref setVisible.
778  using VisibleCallback = llvm::function_ref<void(Module *M)>;
779 
780  /// A callback to call when a module conflict is found. \p Path
781  /// consists of a sequence of modules from the conflicting module to the one
782  /// made visible, where each was exported by the next.
783  using ConflictCallback =
784  llvm::function_ref<void(ArrayRef<Module *> Path, Module *Conflict,
785  StringRef Message)>;
786 
787  /// Make a specific module visible.
788  void setVisible(Module *M, SourceLocation Loc,
789  VisibleCallback Vis = [](Module *) {},
791  StringRef) {});
792 
793 private:
794  /// Import locations for each visible module. Indexed by the module's
795  /// VisibilityID.
796  std::vector<SourceLocation> ImportLocs;
797 
798  /// Visibility generation, bumped every time the visibility state changes.
799  unsigned Generation = 0;
800 };
801 
802 /// Abstracts clang modules and precompiled header files and holds
803 /// everything needed to generate debug info for an imported module
804 /// or PCH.
806  StringRef PCHModuleName;
807  StringRef Path;
808  StringRef ASTFile;
809  ASTFileSignature Signature;
810  Module *ClangModule = nullptr;
811 
812 public:
813  ASTSourceDescriptor() = default;
814  ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile,
815  ASTFileSignature Signature)
816  : PCHModuleName(std::move(Name)), Path(std::move(Path)),
817  ASTFile(std::move(ASTFile)), Signature(Signature) {}
819 
820  std::string getModuleName() const;
821  StringRef getPath() const { return Path; }
822  StringRef getASTFile() const { return ASTFile; }
823  ASTFileSignature getSignature() const { return Signature; }
824  Module *getModuleOrNull() const { return ClangModule; }
825 };
826 
827 
828 } // namespace clang
829 
830 #endif // LLVM_CLANG_BASIC_MODULE_H
clang::Module::DirectUses
SmallVector< Module *, 2 > DirectUses
The directly used modules.
Definition: Module.h:383
clang::Module::Requirement
std::pair< std::string, bool > Requirement
An individual requirement: a feature name and a flag indicating the required state of that feature.
Definition: Module.h:257
clang::Module::getTopLevelModule
Module * getTopLevelModule()
Retrieve the top-level module for this (sub)module, which may be this module.
Definition: Module.h:593
clang::Module::LinkLibrary::LinkLibrary
LinkLibrary(const std::string &Library, bool IsFramework)
Definition: Module.h:396
llvm
YAML serialization mapping.
Definition: Dominators.h:30
clang::Module::InferSubmodules
unsigned InferSubmodules
Whether we should infer submodules for this module based on the headers.
Definition: Module.h:307
clang::ASTFileSignature::create
static ASTFileSignature create(InputIt First, InputIt Last)
Definition: Module.h:85
clang::Module::Header::PathRelativeToRootModuleDirectory
std::string PathRelativeToRootModuleDirectory
Definition: Module.h:216
clang::Module::Requirements
SmallVector< Requirement, 2 > Requirements
The set of language features required to use this module.
Definition: Module.h:263
clang::Module::fullModuleNameIs
bool fullModuleNameIs(ArrayRef< StringRef > nameParts) const
Whether the full name of this module is equal to joining nameParts with "."s.
Definition: Module.cpp:235
clang::DeclaratorContext::File
@ File
clang::Module::getUmbrellaDir
DirectoryName getUmbrellaDir() const
Retrieve the directory for which this module serves as the umbrella.
Definition: Module.cpp:244
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::Module::HasIncompatibleModuleFile
unsigned HasIncompatibleModuleFile
Whether we tried and failed to load a module file for this module.
Definition: Module.h:274
llvm::SmallVector< std::pair< std::string, SourceLocation >, 2 >
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:86
clang::Module::UnresolvedExportDecl::Wildcard
bool Wildcard
Whether this export declaration ends in a wildcard, indicating that all of its submodules should be e...
Definition: Module.h:376
clang::Module::Conflict::Other
Module * Other
The module that this module conflicts with.
Definition: Module.h:437
clang::Module::getFullModuleName
std::string getFullModuleName(bool AllowStringLiterals=false) const
Retrieve the full name of this module, including the path from its top-level module.
Definition: Module.cpp:219
clang::Module::UnresolvedConflict::Id
ModuleId Id
The (unresolved) module id.
Definition: Module.h:424
clang::Module::hasUmbrellaDir
bool hasUmbrellaDir() const
Determine whether this module has an umbrella directory that is not based on an umbrella header.
Definition: Module.h:633
clang::Module::HK_PrivateTextual
@ HK_PrivateTextual
Definition: Module.h:207
clang::Module::submodule_begin
submodule_iterator submodule_begin()
Definition: Module.h:708
clang::Module::setParent
void setParent(Module *M)
Set the parent of this module.
Definition: Module.h:528
clang::Module::Header::Entry
const FileEntry * Entry
Definition: Module.h:217
clang::Module::DirectoryName::Entry
const DirectoryEntry * Entry
Definition: Module.h:227
Filename
StringRef Filename
Definition: Format.cpp:2715
clang::Module::Module
Module(StringRef Name, SourceLocation DefinitionLoc, Module *Parent, bool IsFramework, bool IsExplicit, unsigned VisibilityID)
Construct a new module or submodule.
Definition: Module.cpp:37
clang::TargetInfo
Exposes information about the current target.
Definition: TargetInfo.h:205
clang::Module::NameVisibilityKind
NameVisibilityKind
Describes the visibility of the various names within a particular module.
Definition: Module.h:334
clang::Module::Name
std::string Name
The name of this module.
Definition: Module.h:101
clang::Module::isHeaderLikeModule
bool isHeaderLikeModule() const
Is this module have similar semantics as headers.
Definition: Module.h:536
clang::Module::ModuleMapModule
@ ModuleMapModule
This is a module that was defined by a module map and built out of header files.
Definition: Module.h:109
llvm::Optional< FileEntryRef >
clang::ComparisonCategoryType::First
@ First
DirectoryEntry.h
clang::Module::isModulePartition
bool isModulePartition() const
Is this a module partition.
Definition: Module.h:541
clang::OptionalFileEntryRefDegradesToFileEntryPtr
Wrapper around Optional<FileEntryRef> that degrades to 'const FileEntry*', facilitating incremental p...
Definition: FileEntry.h:298
clang::Module::InferExportWildcard
unsigned InferExportWildcard
Whether, when inferring submodules, the inferr submodules should export all modules they import (e....
Definition: Module.h:315
clang::Module::submodules
llvm::iterator_range< submodule_const_iterator > submodules() const
Definition: Module.h:716
clang::Module::findSubmodule
Module * findSubmodule(StringRef Name) const
Find the submodule with the given name.
Definition: Module.cpp:331
clang::Module::ModuleMapIsPrivate
unsigned ModuleMapIsPrivate
Whether this module came from a "private" module map, found next to a regular (public) module map.
Definition: Module.h:330
clang::VisibleModuleSet::isVisible
bool isVisible(const Module *M) const
Determine whether a module is visible.
Definition: Module.h:765
clang::Module::NameVisibility
NameVisibilityKind NameVisibility
The visibility of names within this particular module.
Definition: Module.h:342
clang::Module::isAvailable
bool isAvailable() const
Determine whether this module is available for use within the current translation unit.
Definition: Module.h:473
clang::Module::~Module
~Module()
Definition: Module.cpp:61
clang::Module::InferredSubmoduleLoc
SourceLocation InferredSubmoduleLoc
The location of the inferred submodule.
Definition: Module.h:345
clang::Module::UnresolvedExports
SmallVector< UnresolvedExportDecl, 2 > UnresolvedExports
The set of export declarations that have yet to be resolved.
Definition: Module.h:380
clang::Module::UnresolvedConflict::Message
std::string Message
The message provided to the user when there is a conflict.
Definition: Module.h:427
clang::Module::UnresolvedDirectUses
SmallVector< ModuleId, 2 > UnresolvedDirectUses
The set of use declarations that have yet to be resolved.
Definition: Module.h:386
clang::Module::Signature
ASTFileSignature Signature
The module signature.
Definition: Module.h:150
clang::Module::isModuleVisible
bool isModuleVisible(const Module *M) const
Determine whether the specified module would be visible to a lookup at the end of this module.
Definition: Module.h:697
clang::Module::submodule_end
submodule_const_iterator submodule_end() const
Definition: Module.h:711
FileEntry.h
clang::Module::NoUndeclaredIncludes
unsigned NoUndeclaredIncludes
Whether files in this module can only include non-modular headers and headers from used modules.
Definition: Module.h:326
clang::Module::getTopHeaders
ArrayRef< const FileEntry * > getTopHeaders(FileManager &FileMgr)
The top-level headers associated with this module.
Definition: Module.cpp:257
clang::Module::submodule_const_iterator
std::vector< Module * >::const_iterator submodule_const_iterator
Definition: Module.h:706
clang::Module::isUnimportable
bool isUnimportable() const
Determine whether this module has been declared unimportable.
Definition: Module.h:453
clang::Module::getVisibilityID
unsigned getVisibilityID() const
Definition: Module.h:703
clang::Module
Describes a module or submodule.
Definition: Module.h:98
clang::Module::getPrivateModuleFragment
Module * getPrivateModuleFragment()
Get the Private Module Fragment (sub-module) for this module, it there is one.
Definition: Module.h:689
clang::Module::Hidden
@ Hidden
All of the names in this module are hidden.
Definition: Module.h:336
clang::Module::findOrInferSubmodule
Module * findOrInferSubmodule(StringRef Name)
Definition: Module.cpp:339
clang::Module::ModulePartitionInterface
@ ModulePartitionInterface
This is a C++ 20 module partition interface.
Definition: Module.h:118
clang::Module::UnresolvedExportDecl::ExportLoc
SourceLocation ExportLoc
The location of the 'export' keyword in the module map file.
Definition: Module.h:368
clang::VisibleModuleSet::getImportLoc
SourceLocation getImportLoc(const Module *M) const
Get the location at which the import of a module was triggered.
Definition: Module.h:770
clang::Module::isSubModule
bool isSubModule() const
Determine whether this module is a submodule.
Definition: Module.h:499
clang::DirectoryEntry
Cached information about one directory (either on disk or in the virtual file system).
Definition: DirectoryEntry.h:36
clang::ASTSourceDescriptor::getModuleOrNull
Module * getModuleOrNull() const
Definition: Module.h:824
clang::ASTFileSignature::truncatedValue
uint64_t truncatedValue() const
Returns the value truncated to the size of an uint64_t.
Definition: Module.h:66
hlsl::uint64_t
unsigned long uint64_t
Definition: hlsl_basic_types.h:25
clang::Module::Exports
SmallVector< ExportDecl, 2 > Exports
The set of export declarations.
Definition: Module.h:362
clang::Module::NumHeaderKinds
static const int NumHeaderKinds
Definition: Module.h:210
clang::ASTSourceDescriptor::getSignature
ASTFileSignature getSignature() const
Definition: Module.h:823
clang::Module::ModuleInterfaceUnit
@ ModuleInterfaceUnit
This is a C++20 module interface unit.
Definition: Module.h:112
clang::Module::HK_Textual
@ HK_Textual
Definition: Module.h:205
clang::VisibleModuleSet::VisibleModuleSet
VisibleModuleSet()=default
clang::Module::getTopLevelModuleName
StringRef getTopLevelModuleName() const
Retrieve the name of the top-level module.
Definition: Module.h:603
clang::Module::IsFramework
unsigned IsFramework
Whether this is a framework module.
Definition: Module.h:286
clang::Module::UnresolvedHeaderDirective::Size
Optional< off_t > Size
Definition: Module.h:243
clang::Module::LinkLibrary
A library or framework to link against when an entity from this module is used.
Definition: Module.h:394
clang::VisibleModuleSet
A set of visible modules.
Definition: Module.h:741
clang::ASTFileSignature::create
static ASTFileSignature create(std::array< uint8_t, 20 > Bytes)
Definition: Module.h:74
clang::Module::HeaderKind
HeaderKind
Definition: Module.h:203
clang::Module::GlobalModuleFragment
@ GlobalModuleFragment
This is a fragment of the global module within some C++ module.
Definition: Module.h:124
clang::Module::ModuleHeaderUnit
@ ModuleHeaderUnit
This is a C++ 20 header unit.
Definition: Module.h:115
clang::Module::DefinitionLoc
SourceLocation DefinitionLoc
The location of the module definition.
Definition: Module.h:104
clang::Module::AllVisible
@ AllVisible
All of the names in this module are visible.
Definition: Module.h:338
clang::Module::Conflicts
std::vector< Conflict > Conflicts
The list of conflicts.
Definition: Module.h:444
clang::Module::UnresolvedConflicts
std::vector< UnresolvedConflict > UnresolvedConflicts
The list of conflicts for which the module-id has not yet been resolved.
Definition: Module.h:432
bool
#define bool
Definition: stdbool.h:20
clang::Module::isPrivateModule
bool isPrivateModule() const
Definition: Module.h:174
clang::Module::getPrimaryModuleInterfaceName
StringRef getPrimaryModuleInterfaceName() const
Get the primary module interface name from a partition.
Definition: Module.h:558
clang::Module::ModuleKind
ModuleKind
Definition: Module.h:106
clang::Module::UnresolvedHeaderDirective::FileName
std::string FileName
Definition: Module.h:240
clang::VisibleModuleSet::getGeneration
unsigned getGeneration() const
Get the current visibility generation.
Definition: Module.h:762
llvm::DenseSet
Definition: Sema.h:77
clang::Module::isPartOfFramework
bool isPartOfFramework() const
Determine whether this module is a part of a framework, either because it is a framework module or be...
Definition: Module.h:512
clang::Module::MissingHeaders
SmallVector< UnresolvedHeaderDirective, 1 > MissingHeaders
Headers that are mentioned in the module map file but could not be found on the file system.
Definition: Module.h:253
clang::ASTSourceDescriptor::getPath
StringRef getPath() const
Definition: Module.h:821
clang::Module::IsExplicit
unsigned IsExplicit
Whether this is an explicit submodule.
Definition: Module.h:289
clang::Module::getASTFile
OptionalFileEntryRefDegradesToFileEntryPtr getASTFile() const
The serialized AST file for this module, if one was created.
Definition: Module.h:608
clang::ASTFileSignature
The signature of a module, which is a hash of the AST content.
Definition: Module.h:56
clang::VisibleModuleSet::setVisible
void setVisible(Module *M, SourceLocation Loc, VisibleCallback Vis=[](Module *) {}, ConflictCallback Cb=[](ArrayRef< Module * >, Module *, StringRef) {})
Make a specific module visible.
Definition: Module.cpp:634
clang::FileEntry
Cached information about one file (either on disk or in the virtual file system).
Definition: FileEntry.h:366
clang::Module::LinkLibrary::IsFramework
bool IsFramework
Whether this is a framework rather than a library.
Definition: Module.h:406
clang::ASTSourceDescriptor::getModuleName
std::string getModuleName() const
Definition: Module.cpp:689
clang::Module::Parent
Module * Parent
The parent of this module.
Definition: Module.h:135
clang::Module::isModuleMapModule
bool isModuleMapModule() const
Definition: Module.h:176
clang::Module::PresumedModuleMapFile
std::string PresumedModuleMapFile
The presumed file name for the module map defining this module.
Definition: Module.h:144
clang::Module::submodules
llvm::iterator_range< submodule_iterator > submodules()
Definition: Module.h:713
clang::Module::submodule_iterator
std::vector< Module * >::iterator submodule_iterator
Definition: Module.h:705
clang::Module::UmbrellaAsWritten
std::string UmbrellaAsWritten
The name of the umbrella entry, as written in the module map.
Definition: Module.h:153
clang::Module::isInterfaceOrPartition
bool isInterfaceOrPartition() const
Definition: Module.h:549
clang::Module::HK_Normal
@ HK_Normal
Definition: Module.h:204
clang::Module::markUnavailable
void markUnavailable(bool Unimportable)
Mark this module and all of its submodules as unavailable.
Definition: Module.cpp:303
clang::Module::LinkLibraries
llvm::SmallVector< LinkLibrary, 2 > LinkLibraries
The set of libraries or frameworks to link against when an entity from this module is used.
Definition: Module.h:411
SourceLocation.h
clang::Indent
raw_ostream & Indent(raw_ostream &Out, const unsigned int Space, bool IsDot)
Definition: JsonSupport.h:21
clang::Module::HK_Private
@ HK_Private
Definition: Module.h:206
clang::Module::DirectoryName::PathRelativeToRootModuleDirectory
std::string PathRelativeToRootModuleDirectory
Definition: Module.h:226
clang::Module::Directory
const DirectoryEntry * Directory
The build directory of this module.
Definition: Module.h:140
clang::Module::Headers
SmallVector< Header, 2 > Headers[5]
The headers that are part of this module.
Definition: Module.h:233
clang::Module::Conflict::Message
std::string Message
The message provided to the user when there is a conflict.
Definition: Module.h:440
clang::Module::isGlobalModule
bool isGlobalModule() const
Does this Module scope describe a fragment of the global module within some C++ module.
Definition: Module.h:172
clang::Module::IsSystem
unsigned IsSystem
Whether this is a "system" module (which assumes that all headers in it are system headers).
Definition: Module.h:293
llvm::ArrayRef
Definition: LLVM.h:34
Value
Value
Definition: UninitializedValues.cpp:103
clang::ASTFileSignature::createDISentinel
static ASTFileSignature createDISentinel()
Definition: Module.h:78
clang::Module::Umbrella
llvm::PointerUnion< const FileEntry *, const DirectoryEntry * > Umbrella
The umbrella header or directory.
Definition: Module.h:147
clang::ASTSourceDescriptor::getASTFile
StringRef getASTFile() const
Definition: Module.h:822
clang::Module::PrivateModuleFragment
@ PrivateModuleFragment
This is the private module fragment within some C++ module.
Definition: Module.h:127
clang::Module::UnresolvedHeaderDirective::HasBuiltinHeader
bool HasBuiltinHeader
Definition: Module.h:242
clang::Module::Imports
llvm::SmallSetVector< Module *, 2 > Imports
The set of modules imported by this module, and on which this module depends.
Definition: Module.h:349
clang::Module::UnresolvedConflict
An unresolved conflict with another module.
Definition: Module.h:422
clang::ASTFileSignature::BaseT
std::array< uint8_t, 20 > BaseT
Definition: Module.h:57
clang::Module::isModulePurview
bool isModulePurview() const
Does this Module scope describe part of the purview of a standard named C++ module?
Definition: Module.h:164
clang::Module::HK_Excluded
@ HK_Excluded
Definition: Module.h:208
clang::Module::getGlobalModuleFragment
Module * getGlobalModuleFragment()
Get the Global Module Fragment (sub-module) for this module, it there is one.
Definition: Module.h:683
clang::Module::InferExplicitSubmodules
unsigned InferExplicitSubmodules
Whether, when inferring submodules, the inferred submodules should be explicit.
Definition: Module.h:311
clang::Module::IsAvailable
unsigned IsAvailable
Whether this module is available in the current translation unit.
Definition: Module.h:280
clang::VisibleModuleSet::ConflictCallback
llvm::function_ref< void(ArrayRef< Module * > Path, Module *Conflict, StringRef Message)> ConflictCallback
A callback to call when a module conflict is found.
Definition: Module.h:785
clang::Module::UnresolvedHeaderDirective::IsUmbrella
bool IsUmbrella
Definition: Module.h:241
clang::Module::Conflict
A conflict between two modules.
Definition: Module.h:435
clang::LangOptions
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:81
std
Definition: Format.h:4477
clang::Module::UnresolvedHeaderDirective
Stored information about a header directive that was found in the module map file but has not been re...
Definition: Module.h:237
clang::VisibleModuleSet::VisibleModuleSet
VisibleModuleSet(VisibleModuleSet &&O)
Definition: Module.h:744
clang::Module::DirectoryName
Information about a directory name as found in the module map file.
Definition: Module.h:224
clang::Module::Kind
ModuleKind Kind
The kind of this module.
Definition: Module.h:131
clang::Module::UndeclaredUses
llvm::SmallSetVector< const Module *, 2 > UndeclaredUses
When NoUndeclaredIncludes is true, the set of modules this module tried to import but didn't because ...
Definition: Module.h:390
clang::Module::isHeaderUnit
bool isHeaderUnit() const
Is this module a header unit.
Definition: Module.h:547
clang
Definition: CalledOnceCheck.h:17
clang::FileManager
Implements support for file system lookup, file system caching, and directory search management.
Definition: FileManager.h:53
clang::Module::isSubModuleOf
bool isSubModuleOf(const Module *Other) const
Check if this module is a (possibly transitive) submodule of Other.
Definition: Module.cpp:173
clang::VisibleModuleSet::operator=
VisibleModuleSet & operator=(VisibleModuleSet &&O)
Move from another visible modules set.
Definition: Module.h:752
clang::Module::ExportAsModule
std::string ExportAsModule
The module through which entities defined in this module will eventually be exposed,...
Definition: Module.h:160
clang::VisibleModuleSet::VisibleCallback
llvm::function_ref< void(Module *M)> VisibleCallback
A callback to call when a module is made visible (directly or indirectly) by a call to setVisible.
Definition: Module.h:778
clang::Module::getModuleInputBufferName
static StringRef getModuleInputBufferName()
Definition: Module.h:726
distance
float __ovld __cnfn distance(float, float)
Returns the distance between p0 and p1.
clang::Module::UnresolvedExportDecl
Describes an exported module that has not yet been resolved (perhaps because the module it refers to ...
Definition: Module.h:366
clang::ASTSourceDescriptor::ASTSourceDescriptor
ASTSourceDescriptor()=default
clang::Module::Header
Information about a header directive as found in the module map file.
Definition: Module.h:214
clang::ComparisonCategoryType::Last
@ Last
clang::Module::print
void print(raw_ostream &OS, unsigned Indent=0, bool Dump=false) const
Print the module map for this module to the given stream.
Definition: Module.cpp:434
clang::Module::AffectingClangModules
llvm::SmallSetVector< Module *, 2 > AffectingClangModules
The set of top-level modules that affected the compilation of this module, but were not imported.
Definition: Module.h:353
clang::Module::UnresolvedExportDecl::Id
ModuleId Id
The name of the module.
Definition: Module.h:371
clang::Module::IsUnimportable
unsigned IsUnimportable
Whether this module has declared itself unimportable, either because it's missing a requirement from ...
Definition: Module.h:271
clang::ASTSourceDescriptor::ASTSourceDescriptor
ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile, ASTFileSignature Signature)
Definition: Module.h:814
clang::Module::ModulePartitionImplementation
@ ModulePartitionImplementation
This is a C++ 20 module partition implementation.
Definition: Module.h:121
clang::Module::getUmbrellaHeader
Header getUmbrellaHeader() const
Retrieve the header that serves as the umbrella header for this module.
Definition: Module.h:624
clang::SourceLocation::isValid
bool isValid() const
Return true if this is a valid SourceLocation object.
Definition: SourceLocation.h:110
clang::Module::ConfigMacros
std::vector< std::string > ConfigMacros
The set of "configuration macros", which are macros that (intentionally) change how this module is bu...
Definition: Module.h:419
clang::Module::dump
void dump() const
Dump the contents of this module to the given output stream.
Definition: APINotesYAMLCompiler.cpp:577
clang::Module::isModuleInterfaceUnit
bool isModuleInterfaceUnit() const
Definition: Module.h:553
clang::Module::LinkLibrary::Library
std::string Library
The library to link against.
Definition: Module.h:403
clang::Module::IsExternC
unsigned IsExternC
Whether this is an 'extern "C"' module (which implicitly puts all headers in it within an 'extern "C"...
Definition: Module.h:298
clang::Module::ConfigMacrosExhaustive
unsigned ConfigMacrosExhaustive
Whether the set of configuration macros is exhaustive.
Definition: Module.h:322
clang::Module::submodule_begin
submodule_const_iterator submodule_begin() const
Definition: Module.h:709
clang::Module::submodule_end
submodule_iterator submodule_end()
Definition: Module.h:710
clang::Module::addTopHeaderFilename
void addTopHeaderFilename(StringRef Filename)
Add a top-level header filename associated with this module.
Definition: Module.h:641
clang::Module::isSubFramework
bool isSubFramework() const
Determine whether this module is a subframework of another framework.
Definition: Module.h:522
clang::Module::setASTFile
void setASTFile(Optional< FileEntryRef > File)
Set the serialized AST file for the top-level module of this module.
Definition: Module.h:613
clang::Module::IsFromModuleFile
unsigned IsFromModuleFile
Whether this module was loaded from a module file.
Definition: Module.h:283
clang::Module::getExportedModules
void getExportedModules(SmallVectorImpl< Module * > &Exported) const
Appends this module's list of exported modules to Exported.
Definition: Module.cpp:354
clang::Module::addRequirement
void addRequirement(StringRef Feature, bool RequiredState, const LangOptions &LangOpts, const TargetInfo &Target)
Add the given feature requirement to the list of features required by this module.
Definition: Module.cpp:291
clang::Module::LinkLibrary::LinkLibrary
LinkLibrary()=default
clang::Module::addTopHeader
void addTopHeader(const FileEntry *File)
Add a top-level header associated with this module.
Definition: Module.cpp:252
llvm::SmallVectorImpl
Definition: Randstruct.h:18
clang::Module::directlyUses
bool directlyUses(const Module *Requested)
Determine whether this module has declared its intention to directly use another module.
Definition: Module.cpp:270
llvm::SmallSetVector
Definition: ExternalSemaSource.h:23
clang::Module::UnresolvedHeaderDirective::Kind
HeaderKind Kind
Definition: Module.h:238
clang::Module::ShadowingModule
Module * ShadowingModule
A module with the same name that shadows this module.
Definition: Module.h:266
clang::Module::UseExportAsModuleLinkName
bool UseExportAsModuleLinkName
Autolinking uses the framework name for linking purposes when this is false and the export_as name ot...
Definition: Module.h:415
clang::Module::UmbrellaRelativeToRootModuleDirectory
std::string UmbrellaRelativeToRootModuleDirectory
Definition: Module.h:156
clang::Module::ExportDecl
llvm::PointerIntPair< Module *, 1, bool > ExportDecl
Describes an exported module.
Definition: Module.h:359
clang::ASTFileSignature::ASTFileSignature
ASTFileSignature(BaseT S={{0}})
Definition: Module.h:61
clang::ASTFileSignature::size
static constexpr size_t size
Definition: Module.h:59
clang::Module::DirectoryName::NameAsWritten
std::string NameAsWritten
Definition: Module.h:225
clang::Module::UnresolvedHeaderDirective::ModTime
Optional< time_t > ModTime
Definition: Module.h:244
clang::Module::IsInferred
unsigned IsInferred
Whether this is an inferred submodule (module * { ... }).
Definition: Module.h:301
clang::Module::UnresolvedHeaderDirective::FileNameLoc
SourceLocation FileNameLoc
Definition: Module.h:239
clang::ASTSourceDescriptor
Abstracts clang modules and precompiled header files and holds everything needed to generate debug in...
Definition: Module.h:805
clang::Module::UnresolvedHeaders
SmallVector< UnresolvedHeaderDirective, 1 > UnresolvedHeaders
Headers that are mentioned in the module map file but that we have not yet attempted to resolve to a ...
Definition: Module.h:249
clang::Module::Header::NameAsWritten
std::string NameAsWritten
Definition: Module.h:215