This is an archive of the discontinued LLVM Phabricator instance.

Fork PDBASTParser to a base class and create PDBASTParserClang
AbandonedPublic

Authored by lanza on Mar 26 2019, 10:34 PM.

Details

Summary

Work is in progress to get swiftc generating PDBs on Windows and lldb
debugging it. Thus, there is need for a PDBASTParserSwift. So we need
to abstract away a base class from PDBASTParser and fork the Clang
specific implementation to a seperate class.

Event Timeline

lanza created this revision.Mar 26 2019, 10:34 PM
lanza updated this revision to Diff 192410.Mar 26 2019, 10:39 PM

Fixed some missing =0s

compnerd accepted this revision.Apr 1 2019, 12:24 PM
This revision is now accepted and ready to land.Apr 1 2019, 12:24 PM

Is the nature of the PDB different enough that it warrants an entirely new implementation? There's a efw places where we parse decorated / undecorated names, but in general I would imagine most of the stuff is language agnostic no?

lanza added a comment.Apr 1 2019, 5:58 PM

Is the nature of the PDB different enough that it warrants an entirely new implementation? There's a few places where we parse decorated / undecorated names, but in general I would imagine most of the stuff is language agnostic no?

PDBASTParser holds a ClangASTContext and does all it's work through it. We need to work through the Swift AST. If either XYZASTContexts were just implemented to the TypeSystem interface this could be doable without subclassing but both rely heavily on pretty specific functionality from their respective {swift,clang}::ASTContexts.

lanza abandoned this revision.Jun 29 2019, 5:45 PM