Skip to content

Commit 629e7a5

Browse files
committed
review comments addressed
1 parent 647f98e commit 629e7a5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

llvm/lib/DebugInfo/Symbolize/Symbolize.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)