[PATCH] D22931: Add __declspec code_seg support

David Majnemer via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 28 13:07:17 PDT 2016


majnemer added a subscriber: majnemer.
majnemer requested changes to this revision.
majnemer added a reviewer: majnemer.
majnemer added a comment.
This revision now requires changes to proceed.

Thanks for contributing this!  I actually worked on an implementation of this feature but never sent it out for review because I couldn't get an answer from Microsoft regarding this issue: https://connect.microsoft.com/VisualStudio/feedback/details/1203505/pragma-code-seg-and-declspec-code-seg-do-not-interact-correctly-with-nested-classes

I don't think the correct solution to `__declspec(code_seg)`.  Because it has special rules with regard to nested classes, we should have a separate attribute whose `Subjects` are `Function` and `Class`.  During Sema processing of the attribute, I'd staple an //implicit// `SectionAttr` to all nested functions.

For future reference, please include full context in your patch.

Also, this needs tests.


Repository:
  rL LLVM

https://reviews.llvm.org/D22931





More information about the cfe-commits mailing list