summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRParser
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-08-13 20:30:11 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-08-13 20:30:11 +0000
commit9b62cf61438b45107c480e4f9058bde9304df6e2 (patch)
tree42e7020691e0166fe9a9a3a4f02817d6da5b7ecf /llvm/lib/CodeGen/MIRParser
parent2db634d8f123f759d5c9a98fe3598037aedb0ad7 (diff)
downloadbcm5719-llvm-9b62cf61438b45107c480e4f9058bde9304df6e2.tar.gz
bcm5719-llvm-9b62cf61438b45107c480e4f9058bde9304df6e2.zip
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. llvm-svn: 244943
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser')
-rw-r--r--llvm/lib/CodeGen/MIRParser/MIRParser.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
index 9b112e34b03..a9cbbc390d7 100644
--- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
+++ b/llvm/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<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
OpenPOWER on IntegriCloud