[PATCH] [lld] enable mach-o and native yaml to be intermixed
David Majnemer
david.majnemer at gmail.com
Thu Jan 9 16:03:27 PST 2014
================
Comment at: lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp:306-309
@@ -302,1 +305,6 @@
+ uint8_t *bytes = file->ownedAllocations.Allocate<uint8_t>(size);
+ uint8_t *p = bytes;
+ for (Hex8 &byte : _normalizedContent) {
+ *p++ = byte;
}
+ return makeArrayRef(bytes, size);
----------------
kledzik at apple.com wrote:
> Shankar Kalpathi Easwaran wrote:
> > wouldnt memcpy work here ?
> The source is a Hex8 array, the destination is uint8_t array. Pragmatically, a memcpy() would work, but some language lawyers would think it fragile.
The definition of `Hex8` would make it seem like `std::copy` would work here.
http://llvm-reviews.chandlerc.com/D2529
BRANCH
svn
ARCANIST PROJECT
lld
More information about the llvm-commits
mailing list