[llvm] 806a79a - [llvm] Drop "const" from "const ArrayRef" (NFC) (#138818)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 7 09:53:23 PDT 2025
Author: Kazu Hirata
Date: 2025-05-07T09:53:20-07:00
New Revision: 806a79abd0aac1f0e2ff7c1172ec402cc860a15b
URL: https://github.com/llvm/llvm-project/commit/806a79abd0aac1f0e2ff7c1172ec402cc860a15b
DIFF: https://github.com/llvm/llvm-project/commit/806a79abd0aac1f0e2ff7c1172ec402cc860a15b.diff
LOG: [llvm] Drop "const" from "const ArrayRef" (NFC) (#138818)
Added:
Modified:
llvm/include/llvm/MC/MCPseudoProbe.h
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/utils/TableGen/Common/CodeGenTarget.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/MC/MCPseudoProbe.h b/llvm/include/llvm/MC/MCPseudoProbe.h
index fd1f055789544..dc14038a03acb 100644
--- a/llvm/include/llvm/MC/MCPseudoProbe.h
+++ b/llvm/include/llvm/MC/MCPseudoProbe.h
@@ -510,7 +510,7 @@ class MCPseudoProbeDecoder {
return iterator_range(It->second);
}
- const ArrayRef<MCDecodedPseudoProbeInlineTree> getInlineTreeVec() const {
+ ArrayRef<MCDecodedPseudoProbeInlineTree> getInlineTreeVec() const {
return InlineTreeVec;
}
diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index f82e169da00e3..0ac5e7e3cc368 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -1343,8 +1343,7 @@ struct InformationCache {
/// Return all functions that might be called indirectly, only valid for
/// closed world modules (see isClosedWorldModule).
- const ArrayRef<Function *>
- getIndirectlyCallableFunctions(Attributor &A) const;
+ ArrayRef<Function *> getIndirectlyCallableFunctions(Attributor &A) const;
/// Return the flat address space if the associated target has.
std::optional<unsigned> getFlatAddressSpace() const;
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 40881fd3ceac8..e432f0cb7d897 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -3285,7 +3285,7 @@ InformationCache::FunctionInfo::~FunctionInfo() {
It.getSecond()->~InstructionVectorTy();
}
-const ArrayRef<Function *>
+ArrayRef<Function *>
InformationCache::getIndirectlyCallableFunctions(Attributor &A) const {
assert(A.isClosedWorldModule() && "Cannot see all indirect callees!");
return IndirectlyCallableFunctions;
diff --git a/llvm/utils/TableGen/Common/CodeGenTarget.h b/llvm/utils/TableGen/Common/CodeGenTarget.h
index 682cc4e2bc9c6..da2f3e060591a 100644
--- a/llvm/utils/TableGen/Common/CodeGenTarget.h
+++ b/llvm/utils/TableGen/Common/CodeGenTarget.h
@@ -252,7 +252,7 @@ class ComplexPattern {
const Record *getValueType() const { return Ty; }
unsigned getNumOperands() const { return NumOperands; }
const std::string &getSelectFunc() const { return SelectFunc; }
- const ArrayRef<const Record *> getRootNodes() const { return RootNodes; }
+ ArrayRef<const Record *> getRootNodes() const { return RootNodes; }
bool hasProperty(enum SDNP Prop) const { return Properties & (1 << Prop); }
unsigned getComplexity() const { return Complexity; }
bool wantsRoot() const { return WantsRoot; }
More information about the llvm-commits
mailing list