File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1414//
1515// ===----------------------------------------------------------------------===//
1616
17+ #include " swift/Basic/LLVMInitialize.h"
1718#include " swift/DependencyScan/DependencyScanImpl.h"
1819#include " swift/DependencyScan/DependencyScanningTool.h"
1920#include " swift/DependencyScan/StringUtils.h"
@@ -104,6 +105,7 @@ void swiftscan_dependency_set_dispose(swiftscan_dependency_set_t *set) {
104105// === Scanner Functions ---------------------------------------------------===//
105106
106107swiftscan_scanner_t swiftscan_scanner_create (void ) {
108+ INITIALIZE_LLVM ();
107109 return wrap (new DependencyScanningTool ());
108110}
109111
@@ -153,13 +155,16 @@ swiftscan_batch_scan_result_create(swiftscan_scanner_t scanner,
153155 auto ResultGraphs = new swiftscan_dependency_graph_t [BatchScanResult.size ()];
154156 for (size_t i = 0 ; i < BatchScanResult.size (); ++i) {
155157 auto &ResultOrErr = BatchScanResult[i];
156- if (ResultOrErr.getError ())
158+ if (ResultOrErr.getError ()) {
157159 ResultGraphs[i] = nullptr ;
160+ continue ;
161+ }
158162
159163 ResultGraphs[i] = ResultOrErr.get ();
160164 }
161165
162166 Result->results = ResultGraphs;
167+ Result->count = BatchScanResult.size ();
163168 return Result;
164169}
165170
You can’t perform that action at this time.
0 commit comments