[Lldb-commits] [PATCH] D64591: [Expression] Move IRDynamicChecks to ClangExpressionParser

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 11 16:00:42 PDT 2019

xiaobai added a comment.

In D64591#1581775 <https://reviews.llvm.org/D64591#1581775>, @jingham wrote:

> This is a little unclear to me.  LLVMUserExpression is the class that represents "anything that uses LLVM at its back end."  Both the Swift & Clang user expressions are instances of this.  Running through IR and inserting little callouts is an LLVMUserExpression type thing.  So it seems like this move is in the right direction, but to be really clean needs to represent LLVMUserExpression in the Plugin Hierarchy.

Right, this makes sense to me. My understanding was that LLVMUserExpression would eventually invoke ClangExpressionParser, which actually handles dealing with IR instrumentation. With swift in the picture, things get a little more complicated because you could want to deal with both ObjC code and Swift code. I think that in that case, LLDB would want to use both Clang and Swift to instrument a user expression. I don't think that the abstractions are set up to account for this use case right now, so it would require some planning and refactoring.



More information about the lldb-commits mailing list