[FuncSpec] Allow ConstExprs that are function pointers
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Tue, 12 Oct 2021 10:03:34 +0000 (11:03 +0100)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Tue, 12 Oct 2021 10:44:26 +0000 (11:44 +0100)
commitfc0fa85171e665f92cee97635bc3a5af8785aa8d
tree226b000d1638ee65fd7a6d51e370a7dad89426e4
parentcd0ba9dc58c5806f4e3cc9635ab1f64af6973a83
[FuncSpec] Allow ConstExprs that are function pointers

This is a follow up of D110529 that disallowed constexprs. That change
introduced a regression as this also disallowed constexprs that are function
pointers, which is actually one of the motivating use cases that we do want to
support.

Differential Revision: https://reviews.llvm.org/D111567
llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
llvm/test/Transforms/FunctionSpecialization/function-specialization-constant-expression3.ll [new file with mode: 0644]