mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add number of elements to overlays
This patch adds a number of stack elements to the number of overlays in the swift_symbolgraph_extract tool. We don't get the defaults from the llvm type on Linux so it needs to be manually specified. I never saw the number of overlays go above zero when dumping while running the test suite, so I don't know what a "reasonable" number looks like here. 8 seemed like a good number at the time.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "swift/Option/Options.h"
|
||||
#include "swift/SymbolGraphGen/SymbolGraphGen.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
using namespace swift;
|
||||
@@ -235,7 +236,7 @@ int swift_symbolgraph_extract_main(ArrayRef<const char *> Args,
|
||||
// don't need to print these errors.
|
||||
CI.removeDiagnosticConsumer(&DiagPrinter);
|
||||
|
||||
SmallVector<ModuleDecl *> Overlays;
|
||||
SmallVector<ModuleDecl *, 8> Overlays;
|
||||
M->findDeclaredCrossImportOverlaysTransitive(Overlays);
|
||||
for (const auto *OM : Overlays) {
|
||||
auto CIM = CI.getASTContext().getModuleByName(OM->getNameStr());
|
||||
|
||||
Reference in New Issue
Block a user