[all-commits] [llvm/llvm-project] ab08df: [IR] Do not set `none` for function uwtable (#93387)

Joshua Cao via All-commits all-commits at lists.llvm.org
Sun Jun 2 15:02:33 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ab08df2292334d4980b3e81829a20904e59e13c9
      https://github.com/llvm/llvm-project/commit/ab08df2292334d4980b3e81829a20904e59e13c9
  Author: Joshua Cao <cao.joshua at yahoo.com>
  Date:   2024-06-02 (Sun, 02 Jun 2024)

  Changed paths:
    M llvm/include/llvm/IR/Function.h
    M llvm/lib/CodeGen/MachineOutliner.cpp
    M llvm/lib/IR/Attributes.cpp
    M llvm/unittests/IR/FunctionTest.cpp

  Log Message:
  -----------
  [IR] Do not set `none` for function uwtable (#93387)

This avoids the pitfall where we set the uwtable to none:
```
func.setUWTableKind(llvm::UWTableKind::None)
```
`Attribute::getAsString()` would see an unknown attribute and fail an
assertion. In this patch, we assert that we do not see a None uwtable
kind.

This also skips the check of `UWTableKind::Async`. It is dominated by
the check of `UWTableKind::Default`, which has the same enum value
(nfc).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list