Skip to content

Commit 1f3fa96

Browse files
committed
[llvm-cov] Fix -Wcovered-switch-default in CoverageMapping.cpp (NFC)
/Users/jiefu/llvm-project/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:959:3: error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default] default: ^ 1 error generated.
1 parent 45a40c1 commit 1f3fa96

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

llvm/lib/ProfileData/Coverage/CoverageMapping.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -931,29 +931,29 @@ static std::string getCoverageMapErrString(coveragemap_error Err,
931931
std::string Msg;
932932
raw_string_ostream OS(Msg);
933933

934-
switch (Err) {
935-
case coveragemap_error::success:
934+
switch ((uint32_t)Err) {
935+
case (uint32_t)coveragemap_error::success:
936936
OS << "success";
937937
break;
938-
case coveragemap_error::eof:
938+
case (uint32_t)coveragemap_error::eof:
939939
OS << "end of File";
940940
break;
941-
case coveragemap_error::no_data_found:
941+
case (uint32_t)coveragemap_error::no_data_found:
942942
OS << "no coverage data found";
943943
break;
944-
case coveragemap_error::unsupported_version:
944+
case (uint32_t)coveragemap_error::unsupported_version:
945945
OS << "unsupported coverage format version";
946946
break;
947-
case coveragemap_error::truncated:
947+
case (uint32_t)coveragemap_error::truncated:
948948
OS << "truncated coverage data";
949949
break;
950-
case coveragemap_error::malformed:
950+
case (uint32_t)coveragemap_error::malformed:
951951
OS << "malformed coverage data";
952952
break;
953-
case coveragemap_error::decompression_failed:
953+
case (uint32_t)coveragemap_error::decompression_failed:
954954
OS << "failed to decompress coverage data (zlib)";
955955
break;
956-
case coveragemap_error::invalid_or_missing_arch_specifier:
956+
case (uint32_t)coveragemap_error::invalid_or_missing_arch_specifier:
957957
OS << "`-arch` specifier is invalid or missing for universal binary";
958958
break;
959959
default:

0 commit comments

Comments
 (0)