1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[NFC][llvm-objcopy] Fix redundant config checks.

The check for unsupported options checks some configs twice in a || expression. Fixes PR47107.
This commit is contained in:
Jordan Rupprecht 2020-08-11 10:37:19 -07:00
parent 5a22f2e49a
commit 97e61228e0

View File

@ -311,8 +311,7 @@ static Error handleArgs(const CopyConfig &Config, Object &Obj) {
Config.ExtractDWO || Config.LocalizeHidden || Config.PreserveDates || Config.ExtractDWO || Config.LocalizeHidden || Config.PreserveDates ||
Config.StripAllGNU || Config.StripDWO || Config.StripNonAlloc || Config.StripAllGNU || Config.StripDWO || Config.StripNonAlloc ||
Config.StripSections || Config.Weaken || Config.DecompressDebugSections || Config.StripSections || Config.Weaken || Config.DecompressDebugSections ||
Config.StripNonAlloc || Config.StripSections || Config.StripUnneeded || Config.StripUnneeded || Config.DiscardMode == DiscardType::Locals ||
Config.DiscardMode == DiscardType::Locals ||
!Config.SymbolsToAdd.empty() || Config.EntryExpr) { !Config.SymbolsToAdd.empty() || Config.EntryExpr) {
return createStringError(llvm::errc::invalid_argument, return createStringError(llvm::errc::invalid_argument,
"option not supported by llvm-objcopy for MachO"); "option not supported by llvm-objcopy for MachO");