<div><br><div class="gmail_quote"><div>On Tue, Mar 21, 2017 at 7:10 PM Jim Ingham <<a href="mailto:jingham@apple.com">jingham@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="gmail_msg">
> On Mar 21, 2017, at 6:58 PM, Jim Ingham <<a href="mailto:jingham@apple.com" class="gmail_msg" target="_blank">jingham@apple.com</a>> wrote:<br class="gmail_msg">
><br class="gmail_msg">
> There's no reason why you couldn't do a C REPL, so having the framework for it in <a href="http://llvm.org" rel="noreferrer" class="gmail_msg" target="_blank">llvm.org</a> seems reasonable. Just the generic part is enough trickery it is worth sharing.<br class="gmail_msg">
><br class="gmail_msg">
> I'm not sure why you care about the fact that Repl.h includes something from Command, but if you do then probably the easiest way to sort that out is to move REPL.h and REPL.cpp into Commands. The REPL is really a modification of the expr command anyway (you can access it at any time in a swift debug session by "expr --repl -- " and the interactive REPL just does some setup and runs lldb expressions in the repl mode.<br class="gmail_msg">
><br class="gmail_msg">
> So even though it is a feature of expressions, and the actual implementation of the REPL is properly somewhere in the Swift tree, it would be equally valid to consider the generic REPL code an extension of the CommandObjectExpression, so living in Commands and #including "CommandObjectExpression" seem reasonable.<br class="gmail_msg">
<br class="gmail_msg">
Note you would still have to do some trickery because REPL.h can't live in source/Commands, so you would have to make REPL::SetCommandOptions take an opaque object and then cast it in the .cpp file where you can include CommandObjectExpression.h and figure out the real type.</blockquote><div><br></div><div>Also there is currently no Commands header directory, so I would probably need to create one with a single file. Kinda unfortunate I guess, but it works </div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="gmail_msg">
<br class="gmail_msg">
Jim<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
><br class="gmail_msg">
> Jim<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
>> On Mar 21, 2017, at 6:37 PM, Jason Molenda via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="gmail_msg" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br class="gmail_msg">
>><br class="gmail_msg">
>> I don't follow REPL issues very closely but I think some people may have hopes of doing a repl in a language other than swift in the future which is why it was upstreamed to llvm.<br class="gmail_msg">
>><br class="gmail_msg">
>> J<br class="gmail_msg">
>><br class="gmail_msg">
>>> On Mar 21, 2017, at 6:34 PM, Zachary Turner <<a href="mailto:zturner@google.com" class="gmail_msg" target="_blank">zturner@google.com</a>> wrote:<br class="gmail_msg">
>>><br class="gmail_msg">
>>> Thanks, I had a suspicion it might be used in Swift. Given that swift seems to be the only consumer, and there are no plans for support for any other languages, would it be reasonable to say that it's a swift-specific addition and could be in the swift repo?<br class="gmail_msg">
>>><br class="gmail_msg">
>>> If not, I will need to come up with a good way to get REPL.h to not #include code from the source tree (and ideally, not #include code from Commands at all).<br class="gmail_msg">
>>><br class="gmail_msg">
>>> On Tue, Mar 21, 2017 at 6:24 PM Jason Molenda <<a href="mailto:jmolenda@apple.com" class="gmail_msg" target="_blank">jmolenda@apple.com</a>> wrote:<br class="gmail_msg">
>>> It's used in the swift lldb, <a href="https://github.com/apple/swift-lldb" rel="noreferrer" class="gmail_msg" target="_blank">https://github.com/apple/swift-lldb</a><br class="gmail_msg">
>>><br class="gmail_msg">
>>> The idea is to have any non-swift specific code in <a href="http://llvm.org" rel="noreferrer" class="gmail_msg" target="_blank">llvm.org</a>; the github repository for swift specific additions.<br class="gmail_msg">
>>><br class="gmail_msg">
>>><br class="gmail_msg">
>>>> On Mar 21, 2017, at 6:19 PM, Zachary Turner via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="gmail_msg" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br class="gmail_msg">
>>>><br class="gmail_msg">
>>>> AFAICT this is all dead code. Unless someone is using it out of tree? There is a way to register repl support for various languages, but no code in tree is actually doing this. It's possible I'm just not finding the code though.<br class="gmail_msg">
>>>><br class="gmail_msg">
>>>> It appears this code was all added about 18 months ago, and if it hasn't found any use in that time frame, it would be great to remove it to reduce technical debt.<br class="gmail_msg">
>>>><br class="gmail_msg">
>>>> That said, if it's actually being used in tree somewhere and I'm just overlooking it, let me know.<br class="gmail_msg">
>>>> _______________________________________________<br class="gmail_msg">
>>>> lldb-dev mailing list<br class="gmail_msg">
>>>> <a href="mailto:lldb-dev@lists.llvm.org" class="gmail_msg" target="_blank">lldb-dev@lists.llvm.org</a><br class="gmail_msg">
>>>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br class="gmail_msg">
>>><br class="gmail_msg">
>><br class="gmail_msg">
>> _______________________________________________<br class="gmail_msg">
>> lldb-dev mailing list<br class="gmail_msg">
>> <a href="mailto:lldb-dev@lists.llvm.org" class="gmail_msg" target="_blank">lldb-dev@lists.llvm.org</a><br class="gmail_msg">
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br class="gmail_msg">
><br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div></div>