aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/MultiplexConsumer.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-03-05 10:54:55 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-03-05 10:54:55 +0000
commit234fe654a3dd2888be42ae5db34db96c5c2c4ba3 (patch)
tree2e6ae67d1dfb3dbce908f2e7bb58a4acf08192ac /lib/Frontend/MultiplexConsumer.cpp
parentb3c312ce4d94a037a83ba6df6650b0317b15edd1 (diff)
Fix a small difference in sema and codegen views of what needs to be output.
In the included testcase, soma thinks that we already have a definition after we see the out of line decl. Codegen puts it in a deferred list, to be output if a use is seen. This would break when we saw an explicit template instantiation definition, since codegen would not be notified. This patch adds a method to the consumer interface so that soma can notify codegen that this decl is now required. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/MultiplexConsumer.cpp')
-rw-r--r--lib/Frontend/MultiplexConsumer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Frontend/MultiplexConsumer.cpp b/lib/Frontend/MultiplexConsumer.cpp
index cef4590955..a1d1156529 100644
--- a/lib/Frontend/MultiplexConsumer.cpp
+++ b/lib/Frontend/MultiplexConsumer.cpp
@@ -209,6 +209,11 @@ bool MultiplexConsumer::HandleTopLevelDecl(DeclGroupRef D) {
return Continue;
}
+void MultiplexConsumer::MarkVarRequired(VarDecl *VD) {
+ for (size_t i = 0, e = Consumers.size(); i != e; ++i)
+ Consumers[i]->MarkVarRequired(VD);
+}
+
void MultiplexConsumer::HandleInterestingDecl(DeclGroupRef D) {
for (size_t i = 0, e = Consumers.size(); i != e; ++i)
Consumers[i]->HandleInterestingDecl(D);