<html>
<head>
<meta name="generator" content="Windows Mail 17.5.9600.20605">
<style data-externalstyle="true"><!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}
p.MsoNormal, li.MsoNormal, div.MsoNormal {
margin:0in;
margin-bottom:.0001pt;
}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst,
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle,
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
--></style></head>
<body dir="ltr">
<div data-externalstyle="false" dir="ltr" style="font-family: 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif';font-size:12pt;"><div style="font-size: 13pt;">Hello Clang Developers:</div><div style="font-size: 13pt;"><br></div><div style="font-size: 13pt;">I’m new to clang and I’m trying to add a “global” keyword to a new extension of C. I’ve found Attr.td and I’ve been playing with it. It seems that what I want is basically the same as what is in the OpenCLGlobalAddressSpace definition:</div><div style="font-size: 13pt;"><br></div><div style="font-size: 13pt;"><font color="#dcdcdc" face="APL385 Unicode"><font color="#dcdcdc" face="APL385 Unicode"><p>def OpenCLGlobalAddressSpace : TypeAttr {</p>
<p> let Spellings = [Keyword<"__global">, Keyword<"global">];</p>
<p> let Documentation = [Undocumented];</p>
<p>}</p></font></font>However, as you can see, OpenCL already uses “global” and the like. I had thought that just putting the TokenKinds.def options in to ensure that it only was recognized for the new language would work, but it turns out that even then, I still get an assertion error about multiple string matches if I duplicate the above using PXCGlobalAddressSpace instead. What I really want is to have the “global” keyword, when in my PXC language, to be mapped as a PXCGlobalAddressSpace, and not as an OpenCLGlobalAddressSpace. How can I do this? Attr.td does not seem to support multiple definitions with the same keywords.<br></div><div style="font-size: 13pt;" data-signatureblock="true"><div style="font-size: 13pt;"><br></div><div style="font-size: 13pt;">-- <br>Aaron W. Hsu | arcfide@sacrideo.us | http://www.sacrideo.us<br>Please support my work: https://www.gratipay.com/arcfide/<br>לֵ֤ב חֲכָמִים֙ בְּבֵ֣ית אֵ֔בֶל וְלֵ֥ב כְּסִילִ֖ים בְּבֵ֥ית שִׂמְחָֽה׃</div><div style="font-size: 13pt;"><br></div></div></div>
</body>
</html>