HLSL: Fix #1912: add attribute syntax for nonreadable/nonwritable

This commit is contained in:
John Kessenich
2019-09-29 18:02:19 -06:00
parent 2d9b0a3550
commit 8a97d38913
5 changed files with 323 additions and 86 deletions

View File

@@ -1993,6 +1993,9 @@ void HlslParseContext::transferTypeAttributes(const TSourceLoc& loc, const TAttr
case EatFormatR8ui: type.getQualifier().layoutFormat = ElfR8ui; break;
case EatFormatUnknown: type.getQualifier().layoutFormat = ElfNone; break;
case EatNonWritable: type.getQualifier().readonly = true; break;
case EatNonReadable: type.getQualifier().writeonly = true; break;
default:
if (! allowEntry)
warn(loc, "attribute does not apply to a type", "", "");