[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 30 05:19:49 PDT 2025


================
@@ -3679,6 +3679,22 @@ static StringRef GetInputKindName(InputKind IK) {
   llvm_unreachable("unknown input language");
 }
 
+static StringRef getExceptionHandlingName(unsigned EHK) {
+  switch (static_cast<LangOptions::ExceptionHandlingKind>(EHK)) {
+  case LangOptions::ExceptionHandlingKind::None:
+  default:
+    return "none";
+  case LangOptions::ExceptionHandlingKind::SjLj:
+    return "sjlj";
+  case LangOptions::ExceptionHandlingKind::DwarfCFI:
+    return "dwarf";
+  case LangOptions::ExceptionHandlingKind::Wasm:
+    return "wasm";
+  }
+
+  llvm_unreachable("covered switch");
----------------
jhuber6 wrote:

Is unreachable necessary here? The compiler is smart enough to know that this function always has a return value I think.

https://github.com/llvm/llvm-project/pull/146342


More information about the cfe-commits mailing list