[llvm-bugs] [Bug 40851] Inline jump tables
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Feb 27 16:57:20 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=40851
Eli Friedman <efriedma at quicinc.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |efriedma at quicinc.com
Resolution|INVALID |---
--- Comment #3 from Eli Friedman <efriedma at quicinc.com> ---
You mean something like the following?
int square(int x) { return x*x; }
int add(int x) { return x + x; }
typedef int (*p)(int);
static const p arr[4] = {square, add};
int test(int x) {
int res = arr[x](1);
return res;
}
That isn't a pattern I've seen before, but I guess we could try to handle it.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190228/32eea589/attachment.html>
More information about the llvm-bugs
mailing list