summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2018-02-27 22:08:15 +0000
committerReid Kleckner <rnk@google.com>2018-02-27 22:08:15 +0000
commit3acdc6773444b0dea84a69e99024e07ebabc0c98 (patch)
tree179123044f6994a794b3c6f7b2bf89ec2c5a458b /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
parent10ab103a58441518780ab8ecdcd7f167aa2f6cbe (diff)
downloadbcm5719-llvm-3acdc6773444b0dea84a69e99024e07ebabc0c98.tar.gz
bcm5719-llvm-3acdc6773444b0dea84a69e99024e07ebabc0c98.zip
[CodeView] Lower __restrict and other pointer qualifiers correctly
Qualifiers on a pointer or reference type may apply to either the pointee or the pointer itself. Consider 'const char *' and 'char * const'. In the first example, the pointee data may not be modified without casts, and in the second example, the pointer may not be updated to point to new data. In the general case, qualifiers are applied to types with LF_MODIFIER records, which support the usual const and volatile qualifiers as well as the __unaligned extension qualifier. However, LF_POINTER records, which are used for pointers, references, and member pointers, have flags for qualifiers applying to the *pointer*. In fact, this is the only way to represent the restrict qualifier, which can only apply to pointers, and cannot qualify regular data types. This patch causes LLVM to correctly fold 'const' and 'volatile' pointer qualifiers into the pointer record, as well as adding support for '__restrict' qualifiers in the same place. Based on a patch from Aaron Smith Differential Revision: https://reviews.llvm.org/D43060 llvm-svn: 326260
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud