[PATCH] -fms-extensions: Implement half of #pragma init_seg
Reid Kleckner
rnk at google.com
Wed Jul 16 17:47:59 PDT 2014
Hi rsmith, majnemer,
This pragma is very rare. We could *hypothetically* lower some uses of
it down to @llvm.global_ctors, but given that GlobalOpt isn't able to
optimize prioritized global ctors today, there's really no point.
If we wanted to do this in the future, I would check if the section used
in the pragma started with ".CRT$XC" and had up to two characters after
it. Those two characters could form the 16-bit initialization priority
that we support in @llvm.global_ctors. We would have to teach LLVM to
lower prioritized global ctors on COFF as well.
This should let us compile some silly uses of this pragma in WebKit /
Blink.
http://reviews.llvm.org/D4549
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Sema/Sema.h
lib/CodeGen/CGDeclCXX.cpp
lib/CodeGen/CodeGenModule.h
lib/Parse/ParsePragma.cpp
lib/Sema/Sema.cpp
lib/Sema/SemaAttr.cpp
lib/Sema/SemaDecl.cpp
test/CodeGenCXX/pragma-init_seg.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4549.11547.patch
Type: text/x-patch
Size: 17552 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140717/a62599a0/attachment.bin>
More information about the cfe-commits
mailing list