This is something of a hack, since whether the reader actually did this depends on the "isConsumerInterestedIn" predicate. I think we need to rework how this works, but I need to discuss with Doug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82111
91177308-0d34-0410-b5e6-
96231b3b80d8
return;
for (unsigned I = 0, N = ExternalDefinitions.size(); I != N; ++I) {
- Decl *D = GetDecl(ExternalDefinitions[I]);
- DeclGroupRef DG(D);
- Consumer->HandleTopLevelDecl(DG);
+ // Force deserialization of this decl, which will cause it to be passed to
+ // the consumer (or queued).
+ GetDecl(ExternalDefinitions[I]);
}
for (unsigned I = 0, N = InterestingDecls.size(); I != N; ++I) {
/// code generation, e.g., inline function definitions, Objective-C
/// declarations with metadata, etc.
static bool isConsumerInterestedIn(Decl *D) {
+ if (isa<FileScopeAsmDecl>(D))
+ return true;
if (VarDecl *Var = dyn_cast<VarDecl>(D))
return Var->isFileVarDecl() && Var->getInit();
if (FunctionDecl *Func = dyn_cast<FunctionDecl>(D))
return D;
}
-