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

Adam Nemet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 08:45:34 PST 2017


anemet added a reviewer: hfinkel.
anemet added a comment.

I think that you want to only add the new DiagnosticKind to the IR layer.  The class itself should reside in CodeGen.  You should then be able to keep the diagnostic and the code producing it closer.  see what I did in https://reviews.llvm.org/D29004.

You also have seemingly unrelated test changes in this patch.  Which reminds me; you need to add a test.



================
Comment at: lib/IR/DiagnosticInfo.cpp:343-344
+
+  OS << getLocationStr() << ": SSP applied to function " << Func.getName()
+     << " due to " << Reason() << '\n';
+  OS.flush();
----------------
This will produce a pretty cryptic message.


https://reviews.llvm.org/D29023





More information about the llvm-commits mailing list