diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2025-07-03 05:21:47 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-02 23:21:47 +0300 |
commit | 7fc50e92a59c764eb6b1897fcdd506aacb92629c (patch) | |
tree | 0745cbd0b880cdaeb833430dc9c468ee42fa1ac2 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 734d31a464e204db699c1cf9433494926deb2aa2 (diff) | |
download | llvm-7fc50e92a59c764eb6b1897fcdd506aacb92629c.zip llvm-7fc50e92a59c764eb6b1897fcdd506aacb92629c.tar.gz llvm-7fc50e92a59c764eb6b1897fcdd506aacb92629c.tar.bz2 |
clang: Fix parsing of seh exception model (#146643)
Fixes regression reported
https://github.com/llvm/llvm-project/pull/146342#issuecomment-3026600152
The test could probably be better. I'm not sure what special is
happening with the module
compile, but I can't seem to reproduce this with just a plain -cc1 run.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index d8916a6..0a9e364 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -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"; } @@ -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); |