Skip to content

Commit 72661f3

Browse files
[Transforms] Drop unnecessary const from return types (NFC)
Identified with readability-const-return-type.
1 parent e7c3eaa commit 72661f3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

llvm/lib/Transforms/Scalar/SROA.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ namespace {
122122
class IRBuilderPrefixedInserter final : public IRBuilderDefaultInserter {
123123
std::string Prefix;
124124

125-
const Twine getNameWithPrefix(const Twine &Name) const {
125+
Twine getNameWithPrefix(const Twine &Name) const {
126126
return Name.isTriviallyEmpty() ? Name : Prefix + Name;
127127
}
128128

llvm/lib/Transforms/Vectorize/VPlan.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -933,12 +933,12 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopPreHeaderBB,
933933
}
934934

935935
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
936-
const Twine VPlanPrinter::getUID(const VPBlockBase *Block) {
936+
Twine VPlanPrinter::getUID(const VPBlockBase *Block) {
937937
return (isa<VPRegionBlock>(Block) ? "cluster_N" : "N") +
938938
Twine(getOrCreateBID(Block));
939939
}
940940

941-
const Twine VPlanPrinter::getOrCreateName(const VPBlockBase *Block) {
941+
Twine VPlanPrinter::getOrCreateName(const VPBlockBase *Block) {
942942
const std::string &Name = Block->getName();
943943
if (!Name.empty())
944944
return Name;

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2250,9 +2250,9 @@ class VPlanPrinter {
22502250
return BlockID.count(Block) ? BlockID[Block] : BlockID[Block] = BID++;
22512251
}
22522252

2253-
const Twine getOrCreateName(const VPBlockBase *Block);
2253+
Twine getOrCreateName(const VPBlockBase *Block);
22542254

2255-
const Twine getUID(const VPBlockBase *Block);
2255+
Twine getUID(const VPBlockBase *Block);
22562256

22572257
/// Print the information related to a CFG edge between two VPBlockBases.
22582258
void drawEdge(const VPBlockBase *From, const VPBlockBase *To, bool Hidden,

0 commit comments

Comments
 (0)