swift
58a8c9ac - [ParseableInterface][sourcekitd] Set the DetailedPreprocessorRecord ClangImporter option on the sub invocation if it's set on the parent

Commit
6 years ago
[ParseableInterface][sourcekitd] Set the DetailedPreprocessorRecord ClangImporter option on the sub invocation if it's set on the parent In addition to capturing more detailed preprocessor info, the DetailedPreprocessorRecord option sets the clang module format to 'raw' rather than the default 'object'. Sourcekitd doesn't link the code generation libs, which it looks like the default 'object' format requires, so it sets this option to true. The subinvocation generated when loading a module from a .swiftinterface file still used the default prior to this change though, so it would end up crashing sourcekitd. This change sets the DetailedProccessorRecord option if the DetailedRecord option is set on the preprocessor options of parent context's clang module loader. This fixes interface generation crashing for modules that only have a .swiftinterface file. rdar://problem/43906499
Author
Nathan Hawes
Committer
Nathan Hawes
Parents
  • lib/Frontend
    • File
      ParseableInterfaceSupport.cpp
  • test/SourceKit/InterfaceGen
    • File
      gen_swift_module.swift
    • gen_swift_module.swift.from_swiftinterface.response
  • tools/SourceKit/lib/SwiftLang
    • File
      SwiftEditorInterfaceGen.cpp