aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-31 17:06:31 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-31 17:06:31 +0000
commit735bee93f1285c5c55c64d80fdc2ede4c0f23341 (patch)
treee1209c2a0b4880eee15e0ce705016372f7c88724 /contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp
parent51315c45ff5643a27f9c84b816db54ee870ba29b (diff)
parent486754660bb926339aefcf012a3f848592babb8b (diff)
Notes
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp')
-rw-r--r--contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp b/contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp
index 77ace0cfa579..7e61ccbb1068 100644
--- a/contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp
+++ b/contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp
@@ -16,7 +16,7 @@
using namespace clang;
-///\brief Constructs a new multiplexing external sema source and appends the
+///Constructs a new multiplexing external sema source and appends the
/// given element to it.
///
MultiplexExternalSemaSource::MultiplexExternalSemaSource(ExternalSemaSource &s1,
@@ -28,7 +28,7 @@ MultiplexExternalSemaSource::MultiplexExternalSemaSource(ExternalSemaSource &s1,
// pin the vtable here.
MultiplexExternalSemaSource::~MultiplexExternalSemaSource() {}
-///\brief Appends new source to the source list.
+///Appends new source to the source list.
///
///\param[in] source - An ExternalSemaSource.
///
@@ -164,6 +164,20 @@ 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::DeclIsFromPCHWithObjectFile(const Decl *D) {
+ for (auto *S : Sources)
+ if (S->DeclIsFromPCHWithObjectFile(D))
+ return true;
+ return false;
+}
+
bool MultiplexExternalSemaSource::layoutRecordType(const RecordDecl *Record,
uint64_t &Size,
uint64_t &Alignment,