[llvm] a6351d8 - Fix "not all control paths return" warnings; NFC (#203361)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 11:53:23 PDT 2026
Author: Aaron Ballman
Date: 2026-06-11T14:53:18-04:00
New Revision: a6351d882ca3086c62e052fbc4f7f585e157213b
URL: https://github.com/llvm/llvm-project/commit/a6351d882ca3086c62e052fbc4f7f585e157213b
DIFF: https://github.com/llvm/llvm-project/commit/a6351d882ca3086c62e052fbc4f7f585e157213b.diff
LOG: Fix "not all control paths return" warnings; NFC (#203361)
In both cases, the switches are fully covered but MSVC still diagnoses.
Added:
Modified:
llvm/lib/IR/BundleAttributes.cpp
llvm/lib/Object/DXContainer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/BundleAttributes.cpp b/llvm/lib/IR/BundleAttributes.cpp
index 88590d58cf6e2..0ca6808d93453 100644
--- a/llvm/lib/IR/BundleAttributes.cpp
+++ b/llvm/lib/IR/BundleAttributes.cpp
@@ -22,6 +22,7 @@ StringRef llvm::getNameFromBundleAttr(BundleAttr BA) {
case BundleAttr::None:
return "none";
}
+ llvm_unreachable("unknonwn bundle attribute");
}
BundleAttr llvm::getBundleAttrFromString(StringRef Str) {
diff --git a/llvm/lib/Object/DXContainer.cpp b/llvm/lib/Object/DXContainer.cpp
index d37eb4833113d..dd4de04f5d38d 100644
--- a/llvm/lib/Object/DXContainer.cpp
+++ b/llvm/lib/Object/DXContainer.cpp
@@ -361,6 +361,7 @@ parseContentsEntries(StringRef Entries,
return Contents.Parameters.EntriesSizeInBytes;
}
}
+ llvm_unreachable("unhandled compression type");
}
static Expected<size_t>
More information about the llvm-commits
mailing list