summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParsePragma.h
Commit message (Collapse)AuthorAgeFilesLines
* Hide pragma handler classes in ParsePragma.cppReid Kleckner2014-02-201-153/+0
| | | | | | | | | | | | | | This reduces the number of files we need to touch to add a new pragma, and reduces the number of externally visible symbols in clang. Make the handlers structs instead of classes because the vast majority have no private members. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2834 llvm-svn: 201820
* MS ABI: Implement #pragma vtordisp() and clang-cl /vdNReid Kleckner2014-02-121-0/+7
| | | | | | | | | | | | | | | | | These features are new in VS 2013 and are necessary in order to layout std::ostream correctly. Currently we have an ABI incompatibility when self-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper in gtest. This change adds another implicit attribute, MSVtorDispAttr, because implicit attributes are currently the best way to make sure the information stays on class templates through instantiation. Reviewers: majnemer Differential Revision: http://llvm-reviews.chandlerc.com/D2746 llvm-svn: 201274
* MS ABI: Add support for #pragma pointers_to_membersDavid Majnemer2014-02-101-0/+7
| | | | | | | | | | | | | | | | | | | Introduce a notion of a 'current representation method' for pointers-to-members. When starting out, this is set to 'best case' (representation method is chosen by examining the class, selecting the smallest representation that would work given the class definition or lack thereof). This pragma allows the translation unit to dictate exactly what representation to use, similar to how the inheritance model keywords operate. N.B. PCH support is forthcoming. Differential Revision: http://llvm-reviews.chandlerc.com/D2723 llvm-svn: 201105
* Adding support for MSVC #pragma detect_mismatch functionality by emitting a ↵Aaron Ballman2013-06-041-0/+10
| | | | | | FAILIFMISMATCH linker command into the object file. llvm-svn: 183178
* Forward #pragma comment(lib/linker) through as flags metadataReid Kleckner2013-05-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | Summary: Most of this change is wiring the pragma all the way through from the lexer, parser, and sema to codegen. I considered adding a Decl AST node for this, but it seemed too heavyweight. Mach-O already uses a metadata flag called "Linker Options" to do this kind of auto-linking. This change follows that pattern. LLVM knows how to forward the "Linker Options" metadata into the COFF .drectve section where these flags belong. ELF support is not implemented, but possible. This is related to auto-linking, which is http://llvm.org/PR13016. CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D723 llvm-svn: 181426
* Move PragmaCommentHandler to lib/Parse in preparation for calling SemaReid Kleckner2013-05-061-0/+8
| | | | | | | | | | | | | | Summary: No functionality change. The existing tests for this pragma only verify that we can preprocess it. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D751 llvm-svn: 181246
* OpenMP threadprivate directive parsing and semantic analysisAlexey Bataev2013-03-221-1/+14
| | | | llvm-svn: 177705
* Permanently end the whole "pragma got handled by the parser too early"Eli Friedman2012-10-041-27/+10
| | | | | | | mess by handling all pragmas which the parser touches uniformly. <rdar://problem/12248901>, etc. llvm-svn: 165195
* Remove unused private member variables found by clang's new ↵Benjamin Kramer2012-06-061-13/+8
| | | | | | -Wunused-private-field. llvm-svn: 158086
* Implement #pragma redefine_extname.David Chisnall2012-02-181-0/+10
| | | | | | This fixes PR5172 and allows clang to compile C++ programs on Solaris using the system headers. llvm-svn: 150881
* Recognize gcc's ms_struct pragma (and ignore for now).Fariborz Jahanian2011-04-251-0/+10
| | | | | | This is wip. llvm-svn: 130138
* OpenCL: add support for __kernel, kernel keywords and EXTENSION,Peter Collingbourne2011-02-141-0/+11
| | | | | | FP_CONTRACT pragmas. Patch originally by ARM. llvm-svn: 125475
* Move support for "#pragma STDC FP_CONTRACT" to Parser; add Sema actionsPeter Collingbourne2011-02-141-0/+11
| | | | llvm-svn: 125474
* When we parse a pragma, keep track of how that pragma was originallyDouglas Gregor2010-09-091-6/+12
| | | | | | | | spelled (#pragma, _Pragma, __pragma). In -E mode, use that information to add appropriate newlines when translating _Pragma and __pragma into #pragma, like GCC does. Fixes <rdar://problem/8412013>. llvm-svn: 113553
* One who seeks knowledge learns something new every day.John McCall2010-08-261-16/+16
| | | | | | | | | One who seeks the Tao unlearns something new every day. Less and less remains until you arrive at non-action. When you arrive at non-action, nothing will be left undone. llvm-svn: 112244
* Implement #pragma GCC visibility.Eli Friedman2010-08-051-0/+9
| | | | llvm-svn: 110315
* Parser: Add support for #pragma align, which is just another spelling of #pragmaDaniel Dunbar2010-07-311-0/+8
| | | | | | options align. llvm-svn: 109952
* Modify the pragma handlers to accept and use StringRefs instead of ↵Argyrios Kyrtzidis2010-07-131-8/+8
| | | | | | | | | | | IdentifierInfos. When loading the PCH, IdentifierInfos that are associated with pragmas cause declarations that use these identifiers to be deserialized (e.g. the "clang" pragma causes the "clang" namespace to be loaded). We can avoid this if we just use StringRefs for the pragmas. As a bonus, since we don't have to create and pass IdentifierInfos, the pragma interfaces get a bit more simplified. llvm-svn: 108237
* Parse: Add support for '#pragma options align'.Daniel Dunbar2010-05-261-0/+9
| | | | | | Also, fix a source location bug with the rparen in #pragma pack. llvm-svn: 104784
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-9/+9
| | | | llvm-svn: 81346
* Add parser support for #pragma weak.Eli Friedman2009-06-051-0/+9
| | | | llvm-svn: 72907
* Implement '#pragma unused'.Ted Kremenek2009-03-231-0/+11
| | | | llvm-svn: 67569
* Add Parser support for #pragma packDaniel Dunbar2008-10-041-0/+33
- Uses Action::ActOnPragmaPack - Test case is XFAIL pending verifier fixes. llvm-svn: 57066
OpenPOWER on IntegriCloud