[PATCH] D115007: Dump swift5 reflection section data into dsym bundle generated binary with dsymutil

Shubham Sandeep Rastogi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 18 14:20:48 PST 2022


rastogishubham added inline comments.


================
Comment at: llvm/tools/dsymutil/DwarfLinkerForBinary.cpp:299
 
+static bool binaryHasSwiftReflectionSections(const DebugMap &Map,
+                                             LinkOptions &Options,
----------------
JDevlieghere wrote:
> Instead of having an in-our argument, could this function return an `Expected<bool>` instead? I also find `NoError` confusing because you end up checking a double negation, i.e. `!NoError`. 
I realized that NoError is not needed, the function just needs to return if there are reflectionsections in the input binary. So a simple return bool value should be enough, the reason is because creating the ObjectEntry and Object are handled in MachoUtils.cpp anyway.


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

https://reviews.llvm.org/D115007



More information about the llvm-commits mailing list