[PATCH] D90194: [Driver] split LangOptions::SSPOff into SSPOFF and SSPUnspecified
Bill Wendling via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 12 14:10:47 PST 2020
void added inline comments.
================
Comment at: clang/include/clang/Basic/LangOptions.h:60
enum GCMode { NonGC, GCOnly, HybridGC };
- enum StackProtectorMode { SSPOff, SSPOn, SSPStrong, SSPReq };
+ enum StackProtectorMode { SSPOff, SSPOn, SSPStrong, SSPReq, SSPUnspecified };
----------------
nickdesaulniers wrote:
> void wrote:
> > I don't know if it's a convention, but an unspecified enum is typically put at the beginning of the enum list.
> This ordering produces the least amount of churn. If I change the ordering, then all of the enum values need to be incremented across all unit tests that specify `-stack-protector <N>` to `cc1`. It would simplify the use of `std::max` in `RenderSSPOptions` slightly. WDYT?
Maybe something like this?
```
enum StackProtectorMode {
SSPUnspecified = -1,
SSPOff = 0,
SSPOn,
SSPStrong,
SSPReq
};
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90194/new/
https://reviews.llvm.org/D90194
More information about the cfe-commits
mailing list