Split the PipeType into two derived classes. This allows Sema to diagnose passing read_only to write_only and vice versa.
A few minor comments regarding outdated comments and style.
Please, update the comment to specify that this function return pipe type with '__read_only' access qualifier.
Please, remove this comment. It's a copy of the comment from the header file.
Please, separate case with an empty line.