From 6893a812921286881a5710d8fff489c7e1d30c1c Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Thu, 13 Aug 2015 20:30:11 +0000 Subject: [PATCH] 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 --- lib/CodeGen/MIRParser/MIRParser.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/CodeGen/MIRParser/MIRParser.cpp b/lib/CodeGen/MIRParser/MIRParser.cpp index 9b112e34b03..a9cbbc390d7 100644 --- a/lib/CodeGen/MIRParser/MIRParser.cpp +++ b/lib/CodeGen/MIRParser/MIRParser.cpp @@ -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 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 -- 2.34.1