Updating the LLVM API of the SAFECode to work in the Clang 3.7V

Dear Sir,
I need a small help regarding the LLVM C API i want to make the Safecode to compile in the latest clang version, can you please make out your time to give me the procedure for updating this. Since i don´t have any docs regarding this so please give me the doc to make that happen since it is my master thesis i have left with 5 weeks of time please help me out for this document.

Thank you

Kind Regards

Nikhil Reddy Kothapally

Technische Universität Chemnitz.Germany

Computer Science (Automotive Software Engineering)

Dear Nikhil,

I currently have a student (Peter Finn) working on updating SAFECode to work with LLVM mainline (i.e., what will become LLVM 3.7). However, he is very new to LLVM, so his progress is, naturally, not as fast as an experienced LLVM developer.

If you would like to help Peter, you can contact him and coordinate effort. In order to help, you will need to learn how to use the LLVM C++ API. This will require understanding how to write an LLVM pass, understanding basic classes such as Module, Function, BasicBlock, and Instruction, and the LLVM programming primitives (isa<>, dyn_cast<>, etc.).

The documentation you need to read is:

LLVM Programmer's Manual
Writing an LLVM Pass
The LLVM Doxygen pages (as needed to find useful classes and methods)

If you update the SAFECode passes to compile with LLVM mainline, you can probably hack the LLVM classes that schedule passes for Clang to run the SAFECode passes unconditionally and then hack the Clang Makefiles to link in the SAFECode libraries (reintegrating SAFECode into Clang will take too much of your time).

To be direct with you, if you are not an experienced LLVM developer, then I am skeptical that you can get SAFECode working *and* finish your Master's thesis on time.

An alternative is to use LLVM 3.2 with the release_32 branch of SAFECode. If LLVM 3.2 won't compile on your machine, you can set up a virtual machine (using VirtualBox, VMWare, Xen, etc.) running an older version of Linux/BSD capable of compiling the older code. FreeBSD 9.0 (and probably 9.3) should be able to compile SAFECode for LLVM 3.2, for example.


John Criswell