[PATCH] D102742: [IR] make stack-protector-guard-* flags into module attrs

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 19 14:37:44 PDT 2021


nickdesaulniers planned changes to this revision.
nickdesaulniers added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:776-783
+  if (getCodeGenOpts().StackProtectorGuard != "")
+    getModule().setStackProtectorGuard(getCodeGenOpts().StackProtectorGuard);
+  if (getCodeGenOpts().StackProtectorGuardReg != "none")
+    getModule().setStackProtectorGuardReg(
+        getCodeGenOpts().StackProtectorGuardReg);
+  if (getCodeGenOpts().StackProtectorGuardOffset != INT_MAX)
+    getModule().setStackProtectorGuardOffset(
----------------
I should add tests for these; that clang emits these module attributes as expected.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102742



More information about the cfe-commits mailing list