<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/91912>91912</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            opencl.ocl.version can not reflect opencl cpp source
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          haonanya
      </td>
    </tr>
</table>

<pre>
    the option -cl-std=cl3.0 emits same metadata as -cl-std=clc++2021 and -cl-std=cl2.0 emits same metadata  as -cl-std=clc++. In llvm-spirv, spirv.Source metadata is determined by opencl.ocl.version, which results in unexpected spirv.Source metadata for opencl cpp source https://github.com/KhronosGroup/SPIRV-Headers/blob/main/include/spirv/unified1/spirv.hpp#L67,L68.
@svenvh, @AnastasiaStulova, @MrSidims
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8kk1v2zwMgH8NfRFiyLSVNAcf-gG_b7EOGBZgd1liYg2yZIhSuv77wVmGrSiykwRSfETioWZ2p0DUg3oA9VTpkqeY-knHoMObrsZo3_o8kYhLdjGIjfEbzhbaJ-PbWgqaXWbBeiYxU9ZWZy00v3tmAB8AH1BiI3Sw73J4A3GDUYvnILw_zxteXDoDPorLpT7Eksxf9Y6FpUxpdoGsGN9EXCgYX0fj6zMldjGsxa-TM5NIxMVnFi6IEujHQiaTvQE-xnRlCbMsgn-lp5wXhvYecAAcTi5PZaxNnAGHT1OKIfJ_KZYFcDh8ef76bfM_aUuJAYfRxxFwmLULgIMLxhdLgMN1vqEEd3Rkm9-heloWwPZluwN8fNne1SCfQN5DJ_lM4TytU0En74PmrNnpQy4-nvU1_DkdnHUzV7Zv7b7d64r6ZtcotZNbtaumvlPYaW1JtWpv1R3iSI2ReNyqbdfukSrXo8ROqqaVLXbNrsax2x2ltB02tmlJQSdp1s7Xq6Y6plPlmAv1-2bfYOX1SJ4vy4YY6FVckoC47l7qL2rHcmLopHec-Q8lu-yp_6hRGB1EiFkkOnoy-aOdqiTf_8PQ-sX12CwpfieTVxVrY6uhS-M_AwAA__9h3gnm">