[clang][ToolChains] explicitly return LangOptions::StackProtectorMode
Make the virtual method Toolchain::GetDefaultStackProtectorLevel() return an explict enum value rather than an integral constant. This makes the code subjectively easier to read, and should help prevent bugs that may (or may never) arise from changing the enum values. Previously, these were just kept in sync via a comment, which is brittle. The trade off is including a additional header in a few new places. It is not necessary, but in my opinion helps the readability. Split off from https://reviews.llvm.org/D90194 to help cut down on lines changed in code review. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D90271
Loading
Please sign in to comment