[PATCH] D65255: [yaml2obj] Move core yaml2obj code into lib and include for use in unittests
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 25 20:21:09 PDT 2019
MaskRay added a comment.
In D65255#1601122 <https://reviews.llvm.org/D65255#1601122>, @jhenderson wrote:
> In D65255#1600507 <https://reviews.llvm.org/D65255#1600507>, @labath wrote:
>
> > Thanks for taking this on. I look forward to being able to use this in lldb tests.
> >
> > I'm not an owner here, but the main question I have is about the library-readiness of the code you're moving. I see it's doing things like spewing errors to stderr and even calling exit(), neither of which is a very nice thing to do for a library (even if it's just a "test" library). Do you have any plans for addressing that?
>
>
> I suggested to Alex offline that he not try to do any more than the bare minimum to get this moved over. Certainly more work needs doing to it, but I think that can be done at a later point rather than upfront when moving it, given how useful it will be to have when working on the libObject code if nothing else.
I agree. It'd be useful if @labath can elaborate which parts he intends to use in lldb. This will help decide how much of yaml2obj should be moved to lib/ObjectYAML.
================
Comment at: llvm/tools/yaml2obj/yaml2obj.cpp:45
-static int convertYAML(yaml::Input &YIn, raw_ostream &Out) {
- unsigned CurDocNum = 0;
----------------
There is probably not much we gain by moving this part to lib/ObjectYAML.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65255/new/
https://reviews.llvm.org/D65255
More information about the llvm-commits
mailing list