@@ -479,7 +479,7 @@ static void writePrescanJSON(llvm::raw_ostream &out,
479
479
out << " {\n " ;
480
480
SWIFT_DEFER { out << " }\n " ; };
481
481
482
- writeJSONSingleField (out, " imports" , importSet, 0 , false );
482
+ writeJSONSingleField (out, " imports" , importSet-> imports , 0 , false );
483
483
}
484
484
485
485
static void writeJSON (llvm::raw_ostream &out,
@@ -544,11 +544,12 @@ static void writeJSON(llvm::raw_ostream &out,
544
544
out.indent (4 * 2 );
545
545
if (swiftTextualDeps) {
546
546
out << " \" swift\" : {\n " ;
547
-
548
547
// / Swift interface file, if there is one. The main module, for
549
548
// / example, will not have an interface file.
550
549
std::string moduleInterfacePath =
551
- get_C_string (swiftTextualDeps->module_interface_path );
550
+ swiftTextualDeps->module_interface_path .data
551
+ ? get_C_string (swiftTextualDeps->module_interface_path )
552
+ : " " ;
552
553
if (!moduleInterfacePath.empty ()) {
553
554
writeJSONSingleField (out, " moduleInterfacePath" , moduleInterfacePath, 5 ,
554
555
/* trailingComma=*/ true );
@@ -585,7 +586,6 @@ static void writeJSON(llvm::raw_ostream &out,
585
586
out.indent (5 * 2 );
586
587
out << " ],\n " ;
587
588
}
588
-
589
589
bool hasBridgingHeaderPath =
590
590
swiftTextualDeps->bridging_header_path .data &&
591
591
get_C_string (swiftTextualDeps->bridging_header_path )[0 ] != ' \0 ' ;
@@ -594,7 +594,6 @@ static void writeJSON(llvm::raw_ostream &out,
594
594
595
595
writeJSONSingleField (out, " isFramework" , swiftTextualDeps->is_framework ,
596
596
5 , commaAfterFramework);
597
-
598
597
if (swiftTextualDeps->extra_pcm_args ->count != 0 ) {
599
598
out.indent (5 * 2 );
600
599
out << " \" extraPcmArgs\" : [\n " ;
0 commit comments