Skip to content

Commit d29562b

Browse files
[IR] Drop unnecessary const from return types (NFC)
Identified with const-return-type.
1 parent 50e4e38 commit d29562b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/include/llvm/IR/DiagnosticInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ class DiagnosticInfoWithLocationBase : public DiagnosticInfo {
381381
/// Return a string with the location information for this diagnostic
382382
/// in the format "file:line:col". If location information is not available,
383383
/// it returns "<unknown>:0:0".
384-
const std::string getLocationStr() const;
384+
std::string getLocationStr() const;
385385

386386
/// Return location information for this diagnostic in three parts:
387387
/// the relative source file path, line number and column.

llvm/lib/IR/DiagnosticInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void DiagnosticInfoWithLocationBase::getLocation(StringRef &RelativePath,
152152
Column = Loc.getColumn();
153153
}
154154

155-
const std::string DiagnosticInfoWithLocationBase::getLocationStr() const {
155+
std::string DiagnosticInfoWithLocationBase::getLocationStr() const {
156156
StringRef Filename("<unknown>");
157157
unsigned Line = 0;
158158
unsigned Column = 0;

0 commit comments

Comments
 (0)