[llvm] r244943 - MIR Parser: Rename the method 'diagFromLLVMAssemblyDiag'. NFC.

Alex Lorenz via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 13:30:11 PDT 2015

Author: arphaman
Date: Thu Aug 13 15:30:11 2015
New Revision: 244943

URL: http://llvm.org/viewvc/llvm-project?rev=244943&view=rev
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.


Modified: llvm/trunk/lib/CodeGen/MIRParser/MIRParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MIRParser/MIRParser.cpp?rev=244943&r1=244942&r2=244943&view=diff
--- llvm/trunk/lib/CodeGen/MIRParser/MIRParser.cpp (original)
+++ llvm/trunk/lib/CodeGen/MIRParser/MIRParser.cpp Thu Aug 13 15:30:11 2015
@@ -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::p
     M = parseAssembly(MemoryBufferRef(BSN->getValue(), Filename), Error,
                       Context, &IRSlots);
     if (!M) {
-      reportDiagnostic(diagFromLLVMAssemblyDiag(Error, BSN->getSourceRange()));
+      reportDiagnostic(diagFromBlockStringDiag(Error, BSN->getSourceRange()));
       return M;
@@ -656,8 +657,8 @@ SMDiagnostic MIRParserImpl::diagFromMISt
-SMDiagnostic MIRParserImpl::diagFromLLVMAssemblyDiag(const SMDiagnostic &Error,
-                                                     SMRange SourceRange) {
+SMDiagnostic MIRParserImpl::diagFromBlockStringDiag(const SMDiagnostic &Error,
+                                                    SMRange SourceRange) {
   // Translate the location of the error from the location in the llvm IR string

More information about the llvm-commits mailing list