[llvm] [CFI] Fix Direct Call Issues in CFI Dispatch Table (PR #69663)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 14:09:43 PST 2023


================
@@ -1471,6 +1471,11 @@ void LowerTypeTestsModule::createJumpTable(
   SmallVector<Value *, 16> AsmArgs;
   AsmArgs.reserve(Functions.size() * 2);
 
+  // Check if the first entry has the NoUnwind attribute.
----------------
efriedma-quic wrote:

>IIUC we'd be able to differentiate NoUnwind from "don't emit EH info" for cfi jump table functions?

Right.  Usually, whether unwinding is possible and whether unwind info is required are strongly correlated.  But if you have a function that tail-calls a function that unwinds, it's possible to unwind "through" the function without unwind info.

https://github.com/llvm/llvm-project/pull/69663


More information about the llvm-commits mailing list