- [NFC] Renamed local matching_module_list to matching_modules for conciseness.
- [NFC] Eliminated redundant local variable num_matches to reduce the risk that changes get it out of sync with matching_modules.GetSize().
- Used an early return from case where the symbol file specified matches multiple modules. This is a slight behavior change, but it's an improvement: It didn't make sense to tell the user that the symbol file simultaneously matched multiple modules and no modules.
- [NFC] Used an early return from the case where no matches are found, to better align with LLVM coding style.
- [NFC] Simplified call of AppendWarningWithFormat("%s", stuff) to AppendWarning(stuff). I don't think this adds any copies. It does construct a StringRef, but it was going to have to scan the string for the length anyway.
- [NFC] Removed unnecessary comments and reworded others for clarity.
- Used an early return if the symbol file could not be loaded. This is a behavior change because previously it could fail silently.
- Used an early return if the object file could not be retrieved from the symbol file. Again, this is a change because now there's an error message.
- If we successfully load a symbol file that seems to match, but then detect a file name mismatch, now we only issue a warning. We've already determined they match, so it seems pointless to change our minds.
- [NFC] Eliminated a namespace alias that wasn't particularly helpful.
This is not unreasonable in the non-pdb world. You can have a stripped version of a file somewhere prepared for deployment to some device (or downloaded from the device), and then you'll also have an unstripped version of that file (with the same name) in some build folder.