[PATCH] D99952: [X86] Initialize TargetOptions::StackProtectorGuardOffset member to its default value
Xiang Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 6 16:50:44 PDT 2021
xiangzhangllvm added inline comments.
================
Comment at: llvm/include/llvm/Target/TargetOptions.h:334
/// Stack protector guard offset to use.
- unsigned StackProtectorGuardOffset : 32;
+ unsigned StackProtectorGuardOffset = (unsigned)-1;
----------------
LemonBoy wrote:
> craig.topper wrote:
> > LemonBoy wrote:
> > > nickdesaulniers wrote:
> > > > Is the cast necessary?
> > > Not really, unless `-Wsign-conversion` or equivalent options are passed.
> > > I'm partial to keeping the explicit cast, if there are strong reasons to remove it I'll get rid of it.
> > Use -1U?
> Good call, thanks.
Does it duplicated with
clang/include/clang/Basic/CodeGenOptions.def:369:VALUE_CODEGENOPT(StackProtectorGuardOffset, 32, (unsigned)-1) ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99952/new/
https://reviews.llvm.org/D99952
More information about the llvm-commits
mailing list