================
@@ -797,6 +798,21 @@ bool AArch64Arm64ECCallLowering::runOnModule(Module &Mod) {
   // Check if this module has the cfguard flag and read its value.
   CFGuardModuleFlag = M->getControlFlowGuardMode();
 
+  // Warn if the module flag requests an unsupported CFGuard mechanism.
+  if (CFGuardModuleFlag == ControlFlowGuardMode::Enabled) {
+    if (auto *CI = mdconst::dyn_extract_or_null<ConstantInt>(
+            Mod.getModuleFlag("cfguard-mechanism"))) {
----------------
arsenm wrote:

If there's something in the IR that does something, it should be documented in 
the LangRef. How to split up langref is another problem, but we need to stop 
having undocumented IR controls 

https://github.com/llvm/llvm-project/pull/176276
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to