xiangzhangllvm added inline comments.

================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:746
     // Indicate that we want to instrument return control flow protection.
-    getModule().addModuleFlag(llvm::Module::Override, "cf-protection-return",
+    getModule().addModuleFlag(llvm::Module::Min, "cf-protection-return",
                               1);
----------------
Take "cf-protection-return" for example:
I pass  the "-fcf-protection=**none**" for following test x86-cf-protection.c
It doesn't has "!{i32 Module::Min, !"cf-protection-return", i32 **0**}".


================
Comment at: clang/test/CodeGen/X86/x86-cf-protection.c:11
 // FULL: #define __CET__ 3
-// CFPROT: "cf-protection-branch", i32 1
-// IBTSEAL: "ibt-seal", i32 1
+// CFPROT: !{i32 8, !"cf-protection-branch", i32 1}
+// IBTSEAL: !{i32 8, !"ibt-seal", i32 1}
----------------
Seems we miss check the "llvm::Module::Override" (4) before, now is better.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130065/new/

https://reviews.llvm.org/D130065

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to