[llvm] d29562b - [IR] Drop unnecessary const from return types (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 4 21:18:33 PST 2021
Author: Kazu Hirata
Date: 2021-02-04T21:18:02-08:00
New Revision: d29562b29c60cb9ec9f8693b08445a54b91d1836
URL: https://github.com/llvm/llvm-project/commit/d29562b29c60cb9ec9f8693b08445a54b91d1836
DIFF: https://github.com/llvm/llvm-project/commit/d29562b29c60cb9ec9f8693b08445a54b91d1836.diff
LOG: [IR] Drop unnecessary const from return types (NFC)
Identified with const-return-type.
Added:
Modified:
llvm/include/llvm/IR/DiagnosticInfo.h
llvm/lib/IR/DiagnosticInfo.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/DiagnosticInfo.h b/llvm/include/llvm/IR/DiagnosticInfo.h
index c457072d50f1..889720735631 100644
--- a/llvm/include/llvm/IR/DiagnosticInfo.h
+++ b/llvm/include/llvm/IR/DiagnosticInfo.h
@@ -381,7 +381,7 @@ class DiagnosticInfoWithLocationBase : public DiagnosticInfo {
/// Return a string with the location information for this diagnostic
/// in the format "file:line:col". If location information is not available,
/// it returns "<unknown>: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/llvm/lib/IR/DiagnosticInfo.cpp b/llvm/lib/IR/DiagnosticInfo.cpp
index 8820a79421c3..749b798945bf 100644
--- a/llvm/lib/IR/DiagnosticInfo.cpp
+++ b/llvm/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("<unknown>");
unsigned Line = 0;
unsigned Column = 0;
More information about the llvm-commits
mailing list