[Lldb-commits] [PATCH] D58172: Embed swig version into lldb.py in a different way

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 14 10:41:28 PST 2019


labath added a comment.

Yes, my long term plan is to try to get rid of this file altogether. Doing the hotpatching at runtime is an interesting idea. I may resort to that, but I think it would be better to add all of these as regular blocks of inline %pythoncode%, as that's how swig is meant to be used. However, i haven't looked at that too closely yet. I am trying to dismantle this one step at a time.

In D58172#1398246 <https://reviews.llvm.org/D58172#1398246>, @zturner wrote:

>   %pythoncode%{
>     swig_version = VERSION
>   }
>
>
> There's no real reason we have to do the parsing here, we could do it in our dotest.py decorators.  I don't have a strong preference on which is better though.


Originally I thought this was a proper api that we deliberately wanted to export, and only later found out that this was added only to support test decorators. However, this gets exported as a public api nonetheless, and it sounds like the kind of thing that might be useful to somebody, so I think it's good to spend a bit of effort to present it in a nicer format. Besides, we're going to need to put the funny parsing code somewhere anyway, and putting it close to the source means we won't have to parse it twice.


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

https://reviews.llvm.org/D58172





More information about the lldb-commits mailing list