<html><head><base href="x-msg://203/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 13, 2011, at 4:16 PM, kobe James wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Hi All,<span class="Apple-converted-space"> </span><br><br>Specifically, the problem is that I want to insert a string into the source code. When the source code is compiled by the compiler into bitcode file such info will be extracted and stored somewhere else, and the compiler only compiles the original source code.<span class="Apple-converted-space"> </span><br>An example is like:<span class="Apple-converted-space"> </span><br>a1.cpp:<span class="Apple-converted-space"> </span><br>int main()<span class="Apple-converted-space"> </span><br>{<span class="Apple-converted-space"> </span><br>    int a = 0;<span class="Apple-converted-space"> </span><br>    cout << a << endl;<span class="Apple-converted-space"> </span><br>}<span class="Apple-converted-space"> </span><br><br>I'd like to insert one string<span class="Apple-converted-space"> </span><br>a2.cpp:<span class="Apple-converted-space"> </span><br>int main()<span class="Apple-converted-space"> </span><br>{<span class="Apple-converted-space"> </span><br>    CheckSthHere;<span class="Apple-converted-space"> </span><br>    int a = 0;<span class="Apple-converted-space"> </span><br>    cout << a << endl;<span class="Apple-converted-space"> </span><br>}<span class="Apple-converted-space"> </span><br><br>I hope to extract such information out a2.cpp and compile only a1.cpp. After compiling a1.cpp into bitcode file I can still get that string information back and do some analysis.<span class="Apple-converted-space"> </span><br><br>Is this possible?<span class="Apple-converted-space"> </span><br></div></div></div></span></blockquote><br></div><div>See if <a href="http://llvm.org/docs/LangRef.html#int_annotation">http://llvm.org/docs/LangRef.html#int_annotation</a> helps.</div><div>-</div><div>Devang</div><br></body></html>