[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Wed May 21 13:16:05 PDT 2025
efriedma-quic wrote:
You might want to look at convertUsersOfConstantsToInstructions, which addresses similar use-cases. (You might be able to use it directly? If not, you can at least reference the implementation.)
Recursively rewriting expression trees should work, and result in well-defined Instructions. We used to have constants with weird constraints, but those are gone in current LLVM.
For "normal" code, you should only run into ConstantExpr and subclasses of ConstantAggregate. There are a few other kinds of constant expressions that could show up with specific flags or unusual constructs (ConstantPtrAuth, NoCFIValue, DSOLocalEquivalent, BlockAddress).
https://github.com/llvm/llvm-project/pull/138972
More information about the llvm-commits
mailing list