This CL introduces MachOObjectFile::getUuid(). This function returns an ArrayRef to the object file's UUID, or an empty ArrayRef if the object file doesn't contain an LC_UUID load command.
The new function is gonna be used by llvm-symbolizer.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
The MachOObjectFile constructor is already walking the load commands. If there is a LC_UUID, you can have the constructor save it off in an ivar.
The name findAndGetUuidCommand() is different than the other methods. Can it just be getUUID() and have it return the 16-bytes? Perhaps an ArrayRef<uint8_t> that has zero length if there is no UUID? Seems like that would be more convenient for the client.
-Nick