llvm.org GIT mirror llvm / 2ca8956
Fix an ASAN failure introduced with r225537 (adding the -universal-headers to llvm-obdump). And a fly by fix to some formatting issues with the same commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225550 91177308-0d34-0410-b5e6-96231b3b80d8 Kevin Enderby 4 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
474474 MachOUniversalBinary::ObjectForArch other_OFA(UB, j);
475475 uint32_t other_cputype = other_OFA.getCPUType();
476476 uint32_t other_cpusubtype = other_OFA.getCPUSubType();
477 if (cputype != 0 && cpusubtype != 0 &&
478 cputype == other_cputype &&
477 if (cputype != 0 && cpusubtype != 0 && cputype == other_cputype &&
479478 (cpusubtype & ~MachO::CPU_SUBTYPE_MASK) ==
480 (other_cpusubtype & ~MachO::CPU_SUBTYPE_MASK))
479 (other_cpusubtype & ~MachO::CPU_SUBTYPE_MASK)) {
481480 outs() << "(illegal duplicate architecture) ";
482481 break;
482 }
483483 }
484484 if (verbose) {
485485 outs() << OFA.getArchTypeName() << "\n";
610610 // No architecture flags were specified so if this contains a slice that
611611 // matches the host architecture dump only that.
612612 if (!ArchAll) {
613 StringRef HostArchName = MachOObjectFile::getHostArch().getArchName();
614613 for (MachOUniversalBinary::object_iterator I = UB->begin_objects(),
615614 E = UB->end_objects();
616615 I != E; ++I) {
617 if (HostArchName == I->getArchTypeName()) {
616 if (MachOObjectFile::getHostArch().getArchName() ==
617 I->getArchTypeName()) {
618618 ErrorOr> ObjOrErr = I->getAsObjectFile();
619619 std::string ArchiveName;
620620 ArchiveName.clear();