[all-commits] [llvm/llvm-project] ff08c8: [SEH] Fix wrong argument passes to the call of Out...

jyu2-git via All-commits all-commits at lists.llvm.org
Mon Aug 21 17:12:00 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ff08c8e57e39d7970b65637595cdc221901f4ed1
      https://github.com/llvm/llvm-project/commit/ff08c8e57e39d7970b65637595cdc221901f4ed1
  Author: Jennifer Yu <jennifer.yu at intel.com>
  Date:   2023-08-21 (Mon, 21 Aug 2023)

  Changed paths:
    M clang/lib/CodeGen/CGCleanup.cpp
    M clang/test/CodeGen/exceptions-seh-finally.c
    M clang/test/CodeGen/windows-seh-EHa-TryInFinally.cpp

  Log Message:
  -----------
  [SEH] Fix wrong argument passes to the call of OutlinedFinally.

When return out of __try block.  In this test case, currently "false" is
passed to OutlinedFinally's call.  "true" should be passed to indicate
abnormal terminations.

The rule: Except _leave and fall-through at the end, all other exits
in a _try (return/goto/continue/break) are considered as abnormal
terminations, NormalCleanupDestSlot is used to indicate abnormal
terminations.

The problem is, during the processing abnormal terminations,
the ExitSwitch is used.  However, in this case, Existswitch is route out.

One way to fix is to skip route it without a switch. So proper
abnormal termination's code could be generated.

Differential Revision: https://reviews.llvm.org/D158233




More information about the All-commits mailing list