There was an error while loading. Please reload this page.
2 parents 33107c2 + f361e3d commit e9caa4eCopy full SHA for e9caa4e
1 file changed
swift/extractor/infra/SwiftBodyEmissionStrategy.h
@@ -13,9 +13,11 @@ class SwiftBodyEmissionStrategy {
13
: currentModule(currentModule),
14
currentPrimarySourceFile(currentPrimarySourceFile),
15
currentLazyDeclaration(currentLazyDeclaration) {
16
- llvm::SmallVector<swift::Decl*> decls;
17
- currentModule.getTopLevelDecls(decls);
18
- currentTopLevelDecls.insert(decls.begin(), decls.end());
+ if (!currentLazyDeclaration) {
+ llvm::SmallVector<swift::Decl*> decls;
+ currentModule.getTopLevelDecls(decls);
19
+ currentTopLevelDecls.insert(decls.begin(), decls.end());
20
+ }
21
}
22
23
bool shouldEmitDeclBody(const swift::Decl& decl);
0 commit comments