Following the LLVM tutorial at http://llvm.org/docs/tutorial/index.html