[clang] [llvm] [win] Add a flag to control the Control Flow Guard mechanism on Windows (PR #176276)

Daniel Paoliello via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 16 10:56:58 PST 2026


dpaoliello wrote:

> Can you give some background explaining why someone would use this flag?

Added a note to the description. tldr; it's about performance.

> Should we warn if someone uses this flag with an Arm64EC target?

MSVC currently doesn't emit anything, but I'm guessing that's because it is a d2 flag. Feels reasonable to warn for using dispatch on EC.

> Maybe split out the ControlFlowGuardMode enum into a separate NFC patch, if it's not too hard.

Sure.

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


More information about the cfe-commits mailing list