Files
clang-p2996/clang/test/CodeGen/windows-seh-async-exceptions.cpp
Jennifer Yu 33e3b2c460 Fix assertion when -fasy-exception is used.
The assertion only happens with use of -fasy-exception without
-fexcessions.

The assertion appen during the call to generate SehScopeBegin(), where
assert with:
assert(CGF.Builder.GetInsertBlock() && InvokeDest);
InvokeDest is null. Because exceptions are disabled, and SEH is not
in use.
The fix is before call EmitSehCppScopeBegin check getInvokeDest(),
to avoid assert during the emit llvm.seh.scope.begin()

Differential Revision: https://reviews.llvm.org/D157566
2023-08-10 21:54:32 -07:00

557 B