rovka added a comment. Hi, you could try looking into LLVMContext::emitError - it shouldn't be too hard to get hold of an LLVMContext, and that's what we use to report e.g. errors in inline asm in SelectionDAGBuilder. https://reviews.llvm.org/D34875