Fixed problem when generating LLVM IR for a function definition and also made the errors more verbose