[clang] [llvm] [NFC][win] Use an enum for the cfguard module flag (PR #176461)

Daniel Paoliello via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 16 15:03:17 PST 2026


================
@@ -1123,10 +1123,14 @@ void CodeGenModule::Release() {
   }
   if (CodeGenOpts.ControlFlowGuard) {
     // Function ID tables and checks for Control Flow Guard (cfguard=2).
-    getModule().addModuleFlag(llvm::Module::Warning, "cfguard", 2);
+    getModule().addModuleFlag(
+        llvm::Module::Warning, "cfguard",
+        static_cast<unsigned>(llvm::ControlFlowGuardMode::Enabled));
   } else if (CodeGenOpts.ControlFlowGuardNoChecks) {
     // Function ID tables for Control Flow Guard (cfguard=1).
----------------
dpaoliello wrote:

Also removed.

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


More information about the cfe-commits mailing list