Utility function for llvm codegen bugchecking