[llvm] [Instrumentation] Drop "const" from "const StringRef" (NFC) (PR #145208)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 21 22:46:12 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/145208
We don't need to put a const on a return type.
>From ccd97fb5bc3b73289c7f09d10f36683753497770 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 21 Jun 2025 15:56:58 -0700
Subject: [PATCH] [Instrumentation] Drop "const" from "const StringRef" (NFC)
We don't need to put a const on a return type.
---
llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
index 4c7b8c69c1bf3..71ab61253e643 100644
--- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
@@ -245,7 +245,7 @@ namespace {
// to the block.
class GCOVLines : public GCOVRecord {
public:
- const StringRef getFilename() { return Filename; }
+ StringRef getFilename() { return Filename; }
void addLine(uint32_t Line) {
assert(Line != 0 && "Line zero is not a valid real line number.");
More information about the llvm-commits
mailing list