Both Linux and kFreeBSD use glibc, so follow similiar code paths.
Add isTargetGlibc to check for this, and use it instead of isTargetLinux
in a few places.
Fixes PR22248 for kFreeBSD.
Differential D19104
[X86] Extend some Linux special cases to cover kFreeBSD. • koriakin on Apr 14 2016, 4:01 AM. Authored by Tokens
Details Both Linux and kFreeBSD use glibc, so follow similiar code paths. Fixes PR22248 for kFreeBSD.
Diff Detail
Event TimelineComment Actions Please can you recreate as a full diff to get more context? http://llvm.org/docs/Phabricator.html explains how you normally should aim to create your diff with something like svn diff --diff-cmd=diff -x -U999999 Comment Actions Uh? diff #2 already has full context, do you want to see full context for the obsolete diff too (I messed up on that one)?
|
Your comment lists the OS types and then you use the GLibc helper - would it be clearer to add a isTargetkFreeBSD() to the if() instead?
An alternative would be to update the comment to make it clear that glibc x86 32-bit targets always have 16-byte alignment, but I'm not sure if that is actually true? If it is, please add a reference.
Additionally, this needs to be tested - I don't think the stack protector tests cover this.