void llvm::emitOptimizationRemarkAnalysis(LLVMContext &Ctx, const char *PassName, const Function &Fn, const DebugLoc &DLoc, const Twine &Msg) { Ctx.diagnose( DiagnosticInfoOptimizationRemarkAnalysis(PassName, Fn, DLoc, Msg)); }
std::unique_ptr<MIRParser> llvm::createMIRParser(std::unique_ptr<MemoryBuffer> Contents, LLVMContext &Context) { auto Filename = Contents->getBufferIdentifier(); if (Context.shouldDiscardValueNames()) { Context.diagnose(DiagnosticInfoMIRParser( DS_Error, SMDiagnostic( Filename, SourceMgr::DK_Error, "Can't read MIR with a Context that discards named Values"))); return nullptr; } return llvm::make_unique<MIRParser>( llvm::make_unique<MIRParserImpl>(std::move(Contents), Filename, Context)); }
void llvm::emitLoopInterleaveWarning(LLVMContext &Ctx, const Function &Fn, const DebugLoc &DLoc, const Twine &Msg) { Ctx.diagnose(DiagnosticInfoOptimizationFailure( Fn, DLoc, Twine("loop not interleaved: " + Msg))); }