From dacec98e68d4629d28bf715b08499e33dd6f7171 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Tue, 9 Feb 2016 19:07:16 +0000 Subject: [PATCH] [Frontend] Handle ASTConsumer::shouldSkipFunctionBody via the MultiplexConsumer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260252 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Frontend/MultiplexConsumer.h | 1 + lib/Frontend/MultiplexConsumer.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/clang/Frontend/MultiplexConsumer.h b/include/clang/Frontend/MultiplexConsumer.h index f92e9bf6c5..3e8c52438d 100644 --- a/include/clang/Frontend/MultiplexConsumer.h +++ b/include/clang/Frontend/MultiplexConsumer.h @@ -54,6 +54,7 @@ public: ASTMutationListener *GetASTMutationListener() override; ASTDeserializationListener *GetASTDeserializationListener() override; void PrintStats() override; + bool shouldSkipFunctionBody(Decl *D) override; // SemaConsumer void InitializeSema(Sema &S) override; diff --git a/lib/Frontend/MultiplexConsumer.cpp b/lib/Frontend/MultiplexConsumer.cpp index 15f876b7bd..12cd86af83 100644 --- a/lib/Frontend/MultiplexConsumer.cpp +++ b/lib/Frontend/MultiplexConsumer.cpp @@ -360,6 +360,13 @@ void MultiplexConsumer::PrintStats() { Consumer->PrintStats(); } +bool MultiplexConsumer::shouldSkipFunctionBody(Decl *D) { + bool Skip = true; + for (auto &Consumer : Consumers) + Skip = Skip && Consumer->shouldSkipFunctionBody(D); + return Skip; +} + void MultiplexConsumer::InitializeSema(Sema &S) { for (auto &Consumer : Consumers) if (SemaConsumer *SC = dyn_cast(Consumer.get())) -- 2.40.0