[llvm] a5b45b4 - Fix -Wcovered-switch-default in MachOUniversalWriter.cpp (NFC)
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 30 16:05:39 PDT 2023
Author: Jie Fu
Date: 2023-10-01T07:04:40+08:00
New Revision: a5b45b48ece35f05ed53440bc792193db52b8b1b
URL: https://github.com/llvm/llvm-project/commit/a5b45b48ece35f05ed53440bc792193db52b8b1b
DIFF: https://github.com/llvm/llvm-project/commit/a5b45b48ece35f05ed53440bc792193db52b8b1b.diff
LOG: Fix -Wcovered-switch-default in MachOUniversalWriter.cpp (NFC)
/llvm-project/llvm/lib/Object/MachOUniversalWriter.cpp:351:3: error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default]
default:
^
1 error generated.
Added:
Modified:
llvm/lib/Object/MachOUniversalWriter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Object/MachOUniversalWriter.cpp b/llvm/lib/Object/MachOUniversalWriter.cpp
index b4dff5f096af94a..ea01e27b7f76075 100644
--- a/llvm/lib/Object/MachOUniversalWriter.cpp
+++ b/llvm/lib/Object/MachOUniversalWriter.cpp
@@ -348,8 +348,6 @@ Error object::writeUniversalBinaryToStream(ArrayRef<Slice> Slices,
FatHeader.magic = MachO::FAT_MAGIC;
return writeUniversalArchsToStream<MachO::fat_arch>(FatHeader, Slices, Out);
break;
- default:
- llvm_unreachable("Invalid fat header type");
}
}
More information about the llvm-commits
mailing list