From 70b89a598ee665d92ee3586a18a2672e01b2668f Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 4 Feb 2021 21:18:01 -0800 Subject: [PATCH] [IR] Drop unnecessary const from return types (NFC) Identified with const-return-type. --- include/llvm/IR/DiagnosticInfo.h | 2 +- lib/IR/DiagnosticInfo.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/llvm/IR/DiagnosticInfo.h b/include/llvm/IR/DiagnosticInfo.h index c457072d50f..88972073563 100644 --- a/include/llvm/IR/DiagnosticInfo.h +++ b/include/llvm/IR/DiagnosticInfo.h @@ -381,7 +381,7 @@ public: /// Return a string with the location information for this diagnostic /// in the format "file:line:col". If location information is not available, /// it returns ":0:0". - const std::string getLocationStr() const; + std::string getLocationStr() const; /// Return location information for this diagnostic in three parts: /// the relative source file path, line number and column. diff --git a/lib/IR/DiagnosticInfo.cpp b/lib/IR/DiagnosticInfo.cpp index 8820a79421c..749b798945b 100644 --- a/lib/IR/DiagnosticInfo.cpp +++ b/lib/IR/DiagnosticInfo.cpp @@ -152,7 +152,7 @@ void DiagnosticInfoWithLocationBase::getLocation(StringRef &RelativePath, Column = Loc.getColumn(); } -const std::string DiagnosticInfoWithLocationBase::getLocationStr() const { +std::string DiagnosticInfoWithLocationBase::getLocationStr() const { StringRef Filename(""); unsigned Line = 0; unsigned Column = 0;