MIR Parser: Rename the method 'diagFromLLVMAssemblyDiag'. NFC.

This commit renames the method 'diagFromLLVMAssemblyDiag' to
'diagFromBlockStringDiag'. This method will be used when converting diagnostics
from other YAML block strings, and not just the LLVM module block string, so
the new name should reflect that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244943 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alex Lorenz 2015-08-13 20:30:11 +00:00
parent a49e11047c
commit 6893a81292

View File

@ -138,9 +138,10 @@ private:
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);
@ -222,7 +223,7 @@ std::unique_ptr<Module> MIRParserImpl::parse() {
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();
@ -656,8 +657,8 @@ SMDiagnostic MIRParserImpl::diagFromMIStringDiag(const SMDiagnostic &Error,
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