Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions clang/lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3682,12 +3682,13 @@ static StringRef GetInputKindName(InputKind IK) {
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::SjLj:
return "sjlj";
case LangOptions::ExceptionHandlingKind::WinEH:
return "seh";
case LangOptions::ExceptionHandlingKind::Wasm:
return "wasm";
}
Expand Down Expand Up @@ -4028,7 +4029,7 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args,
A->getValue())
.Case("dwarf", LangOptions::ExceptionHandlingKind::DwarfCFI)
.Case("sjlj", LangOptions::ExceptionHandlingKind::SjLj)
.Case("wineh", LangOptions::ExceptionHandlingKind::WinEH)
.Case("seh", LangOptions::ExceptionHandlingKind::WinEH)
.Case("wasm", LangOptions::ExceptionHandlingKind::Wasm)
.Case("none", LangOptions::ExceptionHandlingKind::None)
.Default(std::nullopt);
Expand Down
4 changes: 4 additions & 0 deletions clang/test/Modules/mingw-exceptions.cppm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// RUN: %clang -target x86_64-windows-gnu -x c++-module -std=gnu++23 -c -o /dev/null -Xclang -disable-llvm-passes %s

// Make sure the command succeeds and doesn't break on the -exception-model flag in cc1.
export module empty;
Loading