mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
allow swift-symbolgraph-extract to be called on non-swift modules (#42399)
rdar://90842354
This commit is contained in:
@@ -223,7 +223,10 @@ int swift_symbolgraph_extract_main(ArrayRef<const char *> Args,
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
const auto &MainFile = M->getMainFile(FileUnitKind::SerializedAST);
|
||||
FileUnitKind expectedKind = FileUnitKind::SerializedAST;
|
||||
if (M->isNonSwiftModule())
|
||||
expectedKind = FileUnitKind::ClangModule;
|
||||
const auto &MainFile = M->getMainFile(expectedKind);
|
||||
|
||||
if (Options.PrintMessages)
|
||||
llvm::errs() << "Emitting symbol graph for module file: " << MainFile.getModuleDefiningPath() << '\n';
|
||||
|
||||
Reference in New Issue
Block a user