Skip to content

Commit c97fd8b

Browse files
committed
Drop redundant const qualifier from ArrayRef<T>
1 parent 520c2ff commit c97fd8b

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

bolt/include/bolt/Passes/PAuthGadgetScanner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class LeakageInfo : public ExtraInfo {
288288
SmallVector<MCInstReference> LeakingInstrs;
289289

290290
public:
291-
LeakageInfo(const ArrayRef<MCInstReference> Instrs) : LeakingInstrs(Instrs) {}
291+
LeakageInfo(ArrayRef<MCInstReference> Instrs) : LeakingInstrs(Instrs) {}
292292

293293
void print(raw_ostream &OS, const MCInstReference Location) const override;
294294
};

bolt/lib/Passes/PAuthGadgetScanner.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -825,16 +825,15 @@ void DstStatePrinter::print(raw_ostream &OS, const DstState &S) const {
825825
/// version for functions without reconstructed CFG.
826826
class DstSafetyAnalysis {
827827
public:
828-
DstSafetyAnalysis(BinaryFunction &BF,
829-
const ArrayRef<MCPhysReg> RegsToTrackInstsFor)
828+
DstSafetyAnalysis(BinaryFunction &BF, ArrayRef<MCPhysReg> RegsToTrackInstsFor)
830829
: BC(BF.getBinaryContext()), NumRegs(BC.MRI->getNumRegs()),
831830
RegsToTrackInstsFor(RegsToTrackInstsFor) {}
832831

833832
virtual ~DstSafetyAnalysis() {}
834833

835834
static std::shared_ptr<DstSafetyAnalysis>
836835
create(BinaryFunction &BF, MCPlusBuilder::AllocatorIdTy AllocId,
837-
const ArrayRef<MCPhysReg> RegsToTrackInstsFor);
836+
ArrayRef<MCPhysReg> RegsToTrackInstsFor);
838837

839838
virtual void run() = 0;
840839
virtual const DstState &getStateAfter(const MCInst &Inst) const = 0;
@@ -1037,7 +1036,7 @@ class DataflowDstSafetyAnalysis
10371036
public:
10381037
DataflowDstSafetyAnalysis(BinaryFunction &BF,
10391038
MCPlusBuilder::AllocatorIdTy AllocId,
1040-
const ArrayRef<MCPhysReg> RegsToTrackInstsFor)
1039+
ArrayRef<MCPhysReg> RegsToTrackInstsFor)
10411040
: DstSafetyAnalysis(BF, RegsToTrackInstsFor), DFParent(BF, AllocId) {}
10421041

10431042
const DstState &getStateAfter(const MCInst &Inst) const override {
@@ -1121,7 +1120,7 @@ class CFGUnawareDstSafetyAnalysis : public DstSafetyAnalysis {
11211120
public:
11221121
CFGUnawareDstSafetyAnalysis(BinaryFunction &BF,
11231122
MCPlusBuilder::AllocatorIdTy AllocId,
1124-
const ArrayRef<MCPhysReg> RegsToTrackInstsFor)
1123+
ArrayRef<MCPhysReg> RegsToTrackInstsFor)
11251124
: DstSafetyAnalysis(BF, RegsToTrackInstsFor), BF(BF), AllocId(AllocId) {
11261125
StateAnnotationIndex =
11271126
BC.MIB->getOrCreateAnnotationIndex("CFGUnawareDstSafetyAnalysis");
@@ -1164,7 +1163,7 @@ class CFGUnawareDstSafetyAnalysis : public DstSafetyAnalysis {
11641163
std::shared_ptr<DstSafetyAnalysis>
11651164
DstSafetyAnalysis::create(BinaryFunction &BF,
11661165
MCPlusBuilder::AllocatorIdTy AllocId,
1167-
const ArrayRef<MCPhysReg> RegsToTrackInstsFor) {
1166+
ArrayRef<MCPhysReg> RegsToTrackInstsFor) {
11681167
if (BF.hasCFG())
11691168
return std::make_shared<DataflowDstSafetyAnalysis>(BF, AllocId,
11701169
RegsToTrackInstsFor);

0 commit comments

Comments
 (0)