[PATCH] D72167: Add support for __declspec(guard(nocf))

Andrew Paverd via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 3 09:18:36 PST 2020


ajpaverd created this revision.
ajpaverd added reviewers: rnk, dmajor, pcc, hans.
Herald added subscribers: llvm-commits, cfe-commits, hiraditya.
Herald added projects: clang, LLVM.

Avoid using the `nocf_check` attribute with Control Flow Guard. Instead, use a 
new `"guard_nocf"` function attribute to indicate that checks should not be 
added on indirect calls within that function. Add support for 
`__declspec(guard(nocf))` following the same syntax as MSVC.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72167

Files:
  clang/include/clang/Basic/Attr.td
  clang/include/clang/Basic/AttrDocs.td
  clang/lib/CodeGen/CodeGenFunction.cpp
  clang/lib/Sema/SemaDeclAttr.cpp
  clang/test/CodeGen/guard_nocf.c
  clang/test/CodeGenCXX/guard_nocf.cpp
  llvm/docs/LangRef.rst
  llvm/lib/Transforms/CFGuard/CFGuard.cpp
  llvm/test/CodeGen/AArch64/cfguard-checks.ll
  llvm/test/CodeGen/ARM/cfguard-checks.ll
  llvm/test/CodeGen/X86/cfguard-checks.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72167.236078.patch
Type: text/x-patch
Size: 10375 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200103/539b8b72/attachment.bin>


More information about the llvm-commits mailing list