[PATCH] D87702: [Frontend] Add pragma align natural and sort out pragma pack stack effect
Xiangling Liao via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 29 07:43:06 PST 2020
Xiangling_L marked 2 inline comments as done.
Xiangling_L added inline comments.
================
Comment at: clang/include/clang/Sema/Sema.h:637
PragmaStack<MSVtorDispMode> VtorDispStack;
- // #pragma pack.
- // Sentinel to represent when the stack is set to mac68k alignment.
- static const unsigned kMac68kAlignmentSentinel = ~0U;
- PragmaStack<unsigned> PackStack;
+ PragmaStack<AlignPackInfo> PackStack;
// The current #pragma pack values and locations at each #include.
----------------
jasonliu wrote:
> Xiangling_L wrote:
> > jasonliu wrote:
> > > We should consider renaming PackStack to AlignPackStack across Clang. Maybe even as a NFC first. As it is right now, clang already uses one stack to record those two informations from `Pragma align` and `Pragma pack`. Leave it as PackStack is too confusing, and people could actually ignore the pragma Align when developing with PackStack.
> > That's a good point. I will create a NFC accordingly.
> Please post this NFC when you have time.
Thanks for reminding me of this. A NFC patch is posted here: https://reviews.llvm.org/D93901
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87702/new/
https://reviews.llvm.org/D87702
More information about the cfe-commits
mailing list