<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Arvind,</div><div><br></div><div>My understanding is that you'll need to add a pragma handler specifically for it (building on the PragmaHandler class). Depending on what the pragma does (assuming it needs to be represented in LLVM IR) you'll need to create the appropriate representation too.</div><div><br></div><div><div><div><div>I'm at the beginning stages of doing the same thing. I hope someone else will chime in if the blind are leading the blind down the wrong path.</div></div><div><br></div><div>Kirk</div><div><br></div><div>see also:</div></div><div><a href="http://clang.llvm.org/doxygen/classclang_1_1PragmaHandler.html" style="color: blue; text-decoration: underline; ">http://clang.llvm.org/doxygen/classclang_1_1PragmaHandler.html</a><div></div></div><div><div><div><a href="http://llvm.org/releases/1.5/docs/ExtendingLLVM.html#intrinsic" style="color: blue; text-decoration: underline; ">http://llvm.org/releases/1.5/docs/ExtendingLLVM.html#intrinsic</a></div></div></div></div><div><br></div><div><div>On Nov 10, 2010, at 7:45 PM, Arvind Sudarsanam wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="Street">
<o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="address">
<o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City">
<o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="State">
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->


<div lang="EN-US" link="blue" vlink="purple">

<div class="Section1"><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Hi,<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">I want to be able to include a #pragma directive in my C
code, run it through clang and let the directive be available on the LLVM side
(as part of the LLVM IR code) so that I can parse it using a LLVM pass.<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Is there any way to do it? Currently, the pragma directive
just disappears.<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Thanks<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Arvind<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Arvind Sudarsanam</span></font><o:p></o:p></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Software Engineer</span></font><o:p></o:p></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">CPU Technology Inc.</span></font><o:p></o:p></p><p class="MsoNormal"><st1:address w:st="on"><st1:street w:st="on"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">1500 Kansas Ave,
  Suite 3E</span></font></st1:street><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">, <st1:city w:st="on">Longmont</st1:city>,
 <st1:state w:st="on">CO</st1:state></span></font></st1:address><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"> - 80503</span></font><o:p></o:p></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><a href="mailto:asudarsanam@cputech.com">asudarsanam@cputech.com</a></span></font><o:p></o:p></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Ph: 435-512-7769</span></font><o:p></o:p></p><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p> </o:p></span></font></p>

</div>

</div>


_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></o:smarttagtype></o:smarttagtype></o:smarttagtype></o:smarttagtype></blockquote></div><br></body></html>