[PATCH] Initial commit for the llvm-dsymutil tool.

Frederic Riss friss at apple.com
Tue Dec 9 15:16:46 PST 2014


================
Comment at: tools/dsymutil/MachODebugMapParser.cpp:18
@@ +17,3 @@
+
+static ErrorOr<OwningBinary<MachOObjectFile>> createMachOBinary(StringRef file) {
+  ErrorOr<OwningBinary<Binary>> BinaryOrErr = createBinary(file);
----------------
samsonov wrote:
> friss wrote:
> > samsonov wrote:
> > > Can you make use of ObjectFile::createMachOObjectFile() here?
> > I think the quantity of code would be the same because to use it I have to handle the MemoryBuffer creation myself. I'm not sure which one is preferable.
> I think that using the more specific factory function would be more appropriate than calling createBinary(), and manually inspecting its output, making sure we return the same error code as Object library, etc.
The code I actually have in my tree moved to using createMachOObjectFile. I'll see how to change that in the initial version.

http://reviews.llvm.org/D6242






More information about the llvm-commits mailing list