Hdr.BaseAddress = MinAddr;
Hdr.NumAddresses = static_cast<uint32_t>(Funcs.size());
Hdr.StrtabOffset = 0; // We will fix this up later.
- Hdr.StrtabOffset = 0; // We will fix this up later.
+ Hdr.StrtabSize = 0; // We will fix this up later.
memset(Hdr.UUID, 0, sizeof(Hdr.UUID));
if (UUID.size() > sizeof(Hdr.UUID))
return createStringError(std::errc::invalid_argument,
if (ArchFilters.empty())
return true;
- StringRef ObjArch = Obj.getArchTriple().getArchName();
+ Triple ObjTriple(Obj.getArchTriple());
+ StringRef ObjArch = ObjTriple.getArchName();
for (auto Arch : ArchFilters) {
// Match name.
error(Filename, errorToErrorCode(BinOrErr.takeError()));
if (auto *Obj = dyn_cast<ObjectFile>(BinOrErr->get())) {
- auto ArchName = Obj->makeTriple().getArchName();
+ Triple ObjTriple(Obj->makeTriple());
+ auto ArchName = ObjTriple.getArchName();
outs() << "Output file (" << ArchName << "): " << OutFile << "\n";
if (auto Err = handleObjectFile(*Obj, OutFile.c_str()))
return Err;
// Now handle each architecture we need to convert.
for (auto &Obj: FilterObjs) {
- auto ArchName = Obj->getArchTriple().getArchName();
+ Triple ObjTriple(Obj->getArchTriple());
+ auto ArchName = ObjTriple.getArchName();
std::string ArchOutFile(OutFile);
// If we are only handling a single architecture, then we will use the
// normal output file. If we are handling multiple architectures append