SMDiagnostic diagFromMIStringDiag(const SMDiagnostic &Error,
SMRange SourceRange);
- /// Return a MIR diagnostic converted from an LLVM assembly diagnostic.
- SMDiagnostic diagFromLLVMAssemblyDiag(const SMDiagnostic &Error,
- SMRange SourceRange);
+ /// Return a MIR diagnostic converted from a diagnostic located in a YAML
+ /// block scalar string.
+ SMDiagnostic diagFromBlockStringDiag(const SMDiagnostic &Error,
+ SMRange SourceRange);
/// Create an empty function with the given name.
void createDummyFunction(StringRef Name, Module &M);
M = parseAssembly(MemoryBufferRef(BSN->getValue(), Filename), Error,
Context, &IRSlots);
if (!M) {
- reportDiagnostic(diagFromLLVMAssemblyDiag(Error, BSN->getSourceRange()));
+ reportDiagnostic(diagFromBlockStringDiag(Error, BSN->getSourceRange()));
return M;
}
In.nextDocument();
Error.getFixIts());
}
-SMDiagnostic MIRParserImpl::diagFromLLVMAssemblyDiag(const SMDiagnostic &Error,
- SMRange SourceRange) {
+SMDiagnostic MIRParserImpl::diagFromBlockStringDiag(const SMDiagnostic &Error,
+ SMRange SourceRange) {
assert(SourceRange.isValid());
// Translate the location of the error from the location in the llvm IR string