[all-commits] [llvm/llvm-project] cdff3b: [clang][ToolChains] explicitly return LangOptions:...
Nick Desaulniers via All-commits
all-commits at lists.llvm.org
Wed Oct 28 11:21:26 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: cdff3bd932870cc9f84c6828cb1a7bb0df3c5fa0
https://github.com/llvm/llvm-project/commit/cdff3bd932870cc9f84c6828cb1a7bb0df3c5fa0
Author: Nick Desaulniers <ndesaulniers at google.com>
Date: 2020-10-28 (Wed, 28 Oct 2020)
Changed paths:
M clang/include/clang/Driver/ToolChain.h
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/lib/Driver/ToolChains/CrossWindows.h
M clang/lib/Driver/ToolChains/Darwin.h
M clang/lib/Driver/ToolChains/Fuchsia.h
M clang/lib/Driver/ToolChains/OpenBSD.h
M clang/lib/Driver/ToolChains/PS4CPU.h
Log Message:
-----------
[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
More information about the All-commits
mailing list