This completes the needed glueing to support reading tbd files from nm.
This includes specifying which slice filtering with --arch and a new
option specifically for tbd files --add-inlinedinfo which will show
the reexported libraries that are appended in the tbd file.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/Object/TapiFile.h | ||
---|---|---|
57 | Why not just Arch like the ctor argument? | |
llvm/include/llvm/TextAPI/MachO/Architecture.h | ||
50 | Would getNumberOfBits be a more "generic" API? | |
llvm/lib/Object/TapiFile.cpp | ||
44 | Why not do this in the initializer list? | |
llvm/lib/TextAPI/MachO/Architecture.cpp | ||
91 | llvm_unreachable("Fully covered switch above!"); | |
llvm/tools/llvm-nm/llvm-nm.cpp | ||
2111 | I think you should be able to do: if (auto ObjOrErr = I.getAsObjectFile()) |
llvm/include/llvm/TextAPI/MachO/Architecture.h | ||
---|---|---|
50 | I agree but I named that to conform to the MachO api. |
llvm/include/llvm/TextAPI/MachO/Architecture.h | ||
---|---|---|
50 | Fair enough. |
I don't know anything about the tapi/tbd stuff, to speak of, so I can't give any concrete comments, just a number of nits.
llvm/include/llvm/Object/TapiUniversal.h | ||
---|---|---|
57 | Nit: missing blank line between this and the previous function. | |
llvm/include/llvm/TextAPI/MachO/Architecture.h | ||
49 | Nit: missing full stop. | |
llvm/lib/Object/TapiUniversal.cpp | ||
33–42 | I see auto was being used before in various places, but I'm not a fan where it's not clear what the type is (which is the case in almost every instance in these two blocks). However, I'm not familiar with this area of the code base (i.e. the tapi stuff), so feel free to ignore me if this is common style in this area. | |
llvm/tools/llvm-nm/llvm-nm.cpp | ||
2101 | Same comment as earlier - don't use auto where the type is not obvious from the immediate context. | |
2105 | Example why auto is bad: I'm assuming Name is actually a StringRef, in which case, you don't need the const & part of this, since StringRef is designed for lightweight copying. |
llvm/test/Object/Inputs/tapi-invalid-v2.tbd | ||
---|---|---|
2 | Consider moving new test/Object/* tests to test/Object/MachO/* |
the landed patch has applied MaskRay's comments.
llvm/test/Object/Inputs/tapi-invalid-v2.tbd | ||
---|---|---|
2 | Since that directory doesn't exist in the repo currently, I will land a separate NFC commit to move all the machO based nm tests there. |
Why not just Arch like the ctor argument?