mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
1168067dff
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 |
||
---|---|---|
.. | ||
AppendingTypeTableBuilder.cpp | ||
CMakeLists.txt | ||
CodeViewError.cpp | ||
CodeViewRecordIO.cpp | ||
ContinuationRecordBuilder.cpp | ||
CVSymbolVisitor.cpp | ||
CVTypeVisitor.cpp | ||
DebugChecksumsSubsection.cpp | ||
DebugCrossExSubsection.cpp | ||
DebugCrossImpSubsection.cpp | ||
DebugFrameDataSubsection.cpp | ||
DebugInlineeLinesSubsection.cpp | ||
DebugLinesSubsection.cpp | ||
DebugStringTableSubsection.cpp | ||
DebugSubsection.cpp | ||
DebugSubsectionRecord.cpp | ||
DebugSubsectionVisitor.cpp | ||
DebugSymbolRVASubsection.cpp | ||
DebugSymbolsSubsection.cpp | ||
EnumTables.cpp | ||
Formatters.cpp | ||
GlobalTypeTableBuilder.cpp | ||
LazyRandomTypeCollection.cpp | ||
Line.cpp | ||
LLVMBuild.txt | ||
MergingTypeTableBuilder.cpp | ||
RecordName.cpp | ||
RecordSerialization.cpp | ||
SimpleTypeSerializer.cpp | ||
StringsAndChecksums.cpp | ||
SymbolDumper.cpp | ||
SymbolRecordMapping.cpp | ||
SymbolSerializer.cpp | ||
TypeDumpVisitor.cpp | ||
TypeHashing.cpp | ||
TypeIndex.cpp | ||
TypeIndexDiscovery.cpp | ||
TypeRecordMapping.cpp | ||
TypeStreamMerger.cpp | ||
TypeTableCollection.cpp |