aprantl added a comment.

> How does this data get used for Swift code and ObjC interoperability? At the 
> moment I see no use of this IR metadata in LLVM. Does ObjC/Swift interop use 
> the DI IR over in the Swift compiler? Got a link to the code there?

Are you saying the retained types are not emitted in DWARF?
[Assuming the types do show up in the DWARF sections of the the fat .pcm files 
—] Swift has a component called ClangImporter that reads Clang ASTs and 
generates Swift ASTs to provide Swift <-> (Objective-)C interoperability. In 
the debugger, we don't want to have to depend on the availability of C headers 
(and the associated brittleness of include paths) just to realize mixed 
Swift-Objective-C types. Since LLDB already knows how to create Clang ASTs from 
DWARF, we read the types from DWARF build a Clang AST hand that over to the 
ClangImporter in LLDB's embedded Swift compiler and thus realize Clang-imported 
Swift types.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80369/new/

https://reviews.llvm.org/D80369



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to