[PATCH] D39416: [modules] Correctly overload getModule in the MultiplexExternalSemaSource

Raphael Isemann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 22 07:29:27 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rC323122: [modules] Correctly overload getModule in the MultiplexExternalSemaSource (authored by teemperor, committed by ).

Repository:
  rC Clang

https://reviews.llvm.org/D39416

Files:
  include/clang/Sema/MultiplexExternalSemaSource.h
  lib/Sema/MultiplexExternalSemaSource.cpp


Index: lib/Sema/MultiplexExternalSemaSource.cpp
===================================================================
--- lib/Sema/MultiplexExternalSemaSource.cpp
+++ lib/Sema/MultiplexExternalSemaSource.cpp
@@ -164,6 +164,13 @@
     Sources[i]->PrintStats();
 }
 
+Module *MultiplexExternalSemaSource::getModule(unsigned ID) {
+  for (size_t i = 0; i < Sources.size(); ++i)
+    if (auto M = Sources[i]->getModule(ID))
+      return M;
+  return nullptr;
+}
+
 bool MultiplexExternalSemaSource::layoutRecordType(const RecordDecl *Record,
                                                    uint64_t &Size, 
                                                    uint64_t &Alignment,
Index: include/clang/Sema/MultiplexExternalSemaSource.h
===================================================================
--- include/clang/Sema/MultiplexExternalSemaSource.h
+++ include/clang/Sema/MultiplexExternalSemaSource.h
@@ -148,8 +148,10 @@
   /// \brief Print any statistics that have been gathered regarding
   /// the external AST source.
   void PrintStats() override;
-  
-  
+
+  /// \brief Retrieve the module that corresponds to the given module ID.
+  Module *getModule(unsigned ID) override;
+
   /// \brief Perform layout on the given record.
   ///
   /// This routine allows the external AST source to provide an specific 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39416.130892.patch
Type: text/x-patch
Size: 1325 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180122/f4d8986f/attachment.bin>


More information about the cfe-commits mailing list