[LLVMdev] Is it possible to store some info and use it after emitting the bitcode file?

Devang Patel dpatel at apple.com
Thu Jul 14 10:29:24 PDT 2011


On Jul 13, 2011, at 4:16 PM, kobe James wrote:

> Hi All, 
> 
> 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. 
> An example is like: 
> a1.cpp: 
> int main() 
> { 
>     int a = 0; 
>     cout << a << endl; 
> } 
> 
> I'd like to insert one string 
> a2.cpp: 
> int main() 
> { 
>     CheckSthHere; 
>     int a = 0; 
>     cout << a << endl; 
> } 
> 
> 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. 
> 
> Is this possible? 

See if http://llvm.org/docs/LangRef.html#int_annotation helps.
-
Devang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110714/3b3d5566/attachment.html>


More information about the llvm-dev mailing list