[modules] Correctly overload getModule in the MultiplexExternalSemaSource
Summary: The MultiplexExternalSemaSource doesn't correctly overload the `getModule` function, causing the multiplexer to not forward this call as intended. Reviewers: v.g.vassilev Reviewed By: v.g.vassilev Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39416 llvm-svn: 323122
This commit is contained in:
parent
57f9b363c1
commit
025d620ce9
|
@ -149,6 +149,8 @@ public:
|
|||
/// 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.
|
||||
///
|
||||
|
|
|
@ -164,6 +164,13 @@ void MultiplexExternalSemaSource::PrintStats() {
|
|||
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,
|
||||
|
|
Loading…
Reference in New Issue