[PATCH] D90271: [clang][ToolChains] explicitly return LangOptions::StackProtectorMode
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 27 15:34:57 PDT 2020
nickdesaulniers created this revision.
nickdesaulniers added reviewers: void, rnk, phosek, srhines.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
nickdesaulniers requested review of this revision.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D90271
Files:
clang/include/clang/Driver/ToolChain.h
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/CrossWindows.h
clang/lib/Driver/ToolChains/Darwin.h
clang/lib/Driver/ToolChains/Fuchsia.h
clang/lib/Driver/ToolChains/OpenBSD.h
clang/lib/Driver/ToolChains/PS4CPU.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90271.301109.patch
Type: text/x-patch
Size: 6317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201027/52f3335b/attachment.bin>
More information about the cfe-commits
mailing list