summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/SourceMgr.cpp
diff options
context:
space:
mode:
authorWarren Hunt <whunt@google.com>2014-04-08 22:30:47 +0000
committerWarren Hunt <whunt@google.com>2014-04-08 22:30:47 +0000
commitc3b18967ed07d939e70564882806c9729f67637d (patch)
tree9293ffa541604c3a0a26a2704d1c1df4f0f1b271 /llvm/lib/Support/SourceMgr.cpp
parentf7813c56b4aa0d315b172d21b5376f2461c9a381 (diff)
downloadbcm5719-llvm-c3b18967ed07d939e70564882806c9729f67637d.tar.gz
bcm5719-llvm-c3b18967ed07d939e70564882806c9729f67637d.zip
[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
Diffstat (limited to 'llvm/lib/Support/SourceMgr.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud