llvm-project/clang/lib/Parse
Warren Hunt c3b18967ed [MS-ABI] Add support for #pragma section and related pragmas
This patch adds support for the msvc pragmas section, bss_seg, code_seg, 
const_seg and data_seg as well as support for __declspec(allocate()).

Additionally it corrects semantics and adds diagnostics for 
__attribute__((section())) and the interaction between the attribute 
and the msvc pragmas and declspec.  In general conflicts should now be 
well diganosed within and among these features.

In supporting the pragmas new machinery for uniform lexing for 
msvc pragmas was introduced.  The new machinery always lexes the 
entire pragma and stores it on an annotation token.  The parser 
is responsible for parsing the pragma when the handling the 
annotation token.

There is a known outstanding bug in this implementation in C mode.  
Because these attributes and pragmas apply _only_ to definitions, we 
process them at the time we detect a definition.  Due to tentative 
definitions in C, we end up processing the definition late.  This means 
that in C mode, everything that ends up in a BSS section will end up in 
the _last_ BSS section rather than the one that was live at the time of 
tentative definition, even if that turns out to be the point of actual 
definition.  This issue is not known to impact anything as of yet 
because we are not aware of a clear use or use case for #pragma bss_seg 
but should be fixed at some point.

Differential Revision=http://reviews.llvm.org/D3065#inline-16241 

llvm-svn: 205810
2014-04-08 22:30:47 +00:00
..
CMakeLists.txt [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Makefile
ParseAST.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-12 05:09:18 +00:00
ParseCXXInlineMethods.cpp Rename getResultType() on function and method declarations to getReturnType() 2014-01-25 16:55:45 +00:00
ParseDecl.cpp Unify __declspec attribute argument parsing with the common attribute argument parsing code. 2014-03-31 18:18:43 +00:00
ParseDeclCXX.cpp [MS-ABI] Add support for #pragma section and related pragmas 2014-04-08 22:30:47 +00:00
ParseExpr.cpp Add support for MSVC's __FUNCSIG__ 2014-04-08 18:13:24 +00:00
ParseExprCXX.cpp Allow GNU-style attributes on lambda expressions. 2014-03-12 00:01:07 +00:00
ParseInit.cpp Remove dead return in Parser::MayBeDesignationStart(). 2014-03-06 05:37:32 +00:00
ParseObjc.cpp Objective-C. Improve diagnostic error for '@import' 2014-03-26 22:02:43 +00:00
ParseOpenMP.cpp [OPENMP] Implemented 'copyin' clause 2014-03-31 03:36:38 +00:00
ParsePragma.cpp [MS-ABI] Add support for #pragma section and related pragmas 2014-04-08 22:30:47 +00:00
ParseStmt.cpp [MS-ABI] Add support for #pragma section and related pragmas 2014-04-08 22:30:47 +00:00
ParseTemplate.cpp Introduce and use Decl::getAsFunction() to simplify templated function checks 2014-01-22 07:29:52 +00:00
ParseTentative.cpp Add support for MSVC's __FUNCSIG__ 2014-04-08 18:13:24 +00:00
Parser.cpp [MS-ABI] Add support for #pragma section and related pragmas 2014-04-08 22:30:47 +00:00
RAIIObjectsForParser.h ExpectAndConsume: Diagnose errors automatically 2014-01-01 03:08:43 +00:00