File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
llvm/lib/DebugInfo/Symbolize Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -595,9 +595,9 @@ Expected<ObjectFile *> LLVMSymbolizer::getOrCreateObjectFromArchive(
595595 return errorCodeToError (object_error::invalid_file_type);
596596
597597 Error Err = Error::success ();
598-
598+
599599 // On AIX, archives can contain multiple members with same name but different
600- // types. We need to check all matches and find one that matches both name and
600+ // types. We need to check all matches and find one that matches both name and
601601 // architecture.
602602 for (auto &Child : Archive->children (Err, /* SkipInternal=*/ true )) {
603603 Expected<StringRef> NameOrErr = Child.getName ();
@@ -608,17 +608,15 @@ Expected<ObjectFile *> LLVMSymbolizer::getOrCreateObjectFromArchive(
608608 Child.getAsBinary ();
609609 if (!MemberOrErr)
610610 continue ;
611-
611+
612612 std::unique_ptr<object::Binary> Binary = std::move (*MemberOrErr);
613613 if (auto *Obj = dyn_cast<object::ObjectFile>(Binary.get ())) {
614- #ifdef _AIX
615614 Triple::ArchType ObjArch = Obj->makeTriple ().getArch ();
616615 Triple RequestedTriple;
617616 RequestedTriple.setArch (Triple::getArchTypeForLLVMName (ArchName));
618617 if (ObjArch != RequestedTriple.getArch ())
619618 continue ;
620- #endif
621- ArchiveCacheKey CacheKey{ArchivePath.str (), MemberName.str (), ArchName};
619+ ArchiveCacheKey CacheKey{ArchivePath.str (), MemberName.str (), ArchName.str ()};
622620 auto I = ObjectForArchivePathAndArch.find (CacheKey);
623621 if (I != ObjectForArchivePathAndArch.end ())
624622 return I->second .get ();
You can’t perform that action at this time.
0 commit comments