[llvm] [llvm] Drop "const" from "const ArrayRef" (NFC) (PR #138818)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 7 01:03:54 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-tablegen
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/138818.diff
4 Files Affected:
- (modified) llvm/include/llvm/MC/MCPseudoProbe.h (+1-1)
- (modified) llvm/include/llvm/Transforms/IPO/Attributor.h (+1-2)
- (modified) llvm/lib/Transforms/IPO/Attributor.cpp (+1-1)
- (modified) llvm/utils/TableGen/Common/CodeGenTarget.h (+1-1)
``````````diff
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; }
``````````
</details>
https://github.com/llvm/llvm-project/pull/138818
More information about the llvm-commits
mailing list