[LLVMdev] Reading the output of clang

Ivan Llopard ivanllopard at gmail.com
Thu Aug 2 01:06:45 PDT 2012


Hi Sitvanit,

You can create your own llvm pass as a shared library and use opt to run 
it. Take a look at the doc here http://llvm.org/docs/WritingAnLLVMPass.html.

Ivan

On 02/08/2012 09:41, Sitvanit Ruah wrote:
> What is the best level to use for backend development? We do not need to
> generate machine code, but rather an intermediate representation that will
> give us the control flow graph.
> Is this  the llvm IR?
> If so, how do I read into memory a file that was generated by clang++
> -emit-llvm<source file>.
>
> Thanks,
> Sitvanit
>
> Sitvanit Ruah
> Formal Verification Group
> IBM Haifa Research Laboratory
> Tel:  972-4-828-1249
>
>
>
>
> From:	Konstantin Tokarev<annulen at yandex.ru>
> To:	Sitvanit Ruah/Haifa/IBM at IBMIL,
> Cc:	llvmdev at cs.uiuc.edu
> Date:	01/08/2012 01:22 PM
> Subject:	Re:[LLVMdev] Reading the AST from the bitcode generated by
>              clang
>
>
>
>
>
>> Hi all,
>> After reading the documentation on clang I still have the following
>> question:
>> How do I read the bitcode generated by clang from a C++ file? I need to
>> have all the AST information in memory.
> AST has nothing to do with LLVM bitcode.
>
>   --
> Regards,
> Konstantin
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list