[PATCH] D29023: [Stack Protection] Add diagnostic information for why stack protection was applied to a function

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 04:46:42 PST 2017


jhenderson updated this revision to Diff 85566.
jhenderson added a comment.

Switched to using StringRef as suggested. Added test to check that the diagnostic is issued in each different case.

Also several small changes based on comments in https://reviews.llvm.org/D29027. Removed unused Unknown reason. Added an end marker to the enum that can be used by the clang-side diagnostics when deciding if stack protection was applied due to a function attribute or command-line switch (i.e. -fstack-protector-all). Finally, added to alloca case that it could be a variable length array that caused stack protection to be applied (this is indistinguishable at this point from an explicit use of allloca).


https://reviews.llvm.org/D29023

Files:
  include/llvm/CodeGen/StackProtector.h
  include/llvm/IR/DiagnosticInfo.h
  lib/CodeGen/StackProtector.cpp
  test/CodeGen/X86/stack-protector-remarks.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29023.85566.patch
Type: text/x-patch
Size: 8283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170124/55e310e3/attachment.bin>


More information about the llvm-commits mailing list