Skip to content

Commit 3bf4d6f

Browse files
committed
Drop redundant const qualifier from ArrayRef<T>
1 parent 400d909 commit 3bf4d6f

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

bolt/include/bolt/Passes/PAuthGadgetScanner.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ class LeakageInfo : public ExtraInfo {
290290
SmallVector<MCInstReference> LeakingInstrs;
291291

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

295295
void print(raw_ostream &OS, const MCInstReference Location) const override;
296296
};

bolt/lib/Passes/PAuthGadgetScanner.cpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -823,16 +823,15 @@ void DstStatePrinter::print(raw_ostream &OS, const DstState &S) const {
823823
/// version for functions without reconstructed CFG.
824824
class DstSafetyAnalysis {
825825
public:
826-
DstSafetyAnalysis(BinaryFunction &BF,
827-
const ArrayRef<MCPhysReg> RegsToTrackInstsFor)
826+
DstSafetyAnalysis(BinaryFunction &BF, ArrayRef<MCPhysReg> RegsToTrackInstsFor)
828827
: BC(BF.getBinaryContext()), NumRegs(BC.MRI->getNumRegs()),
829828
RegsToTrackInstsFor(RegsToTrackInstsFor) {}
830829

831830
virtual ~DstSafetyAnalysis() {}
832831

833832
static std::shared_ptr<DstSafetyAnalysis>
834833
create(BinaryFunction &BF, MCPlusBuilder::AllocatorIdTy AllocId,
835-
const ArrayRef<MCPhysReg> RegsToTrackInstsFor);
834+
ArrayRef<MCPhysReg> RegsToTrackInstsFor);
836835

837836
virtual void run() = 0;
838837
virtual const DstState &getStateAfter(const MCInst &Inst) const = 0;
@@ -1035,7 +1034,7 @@ class DataflowDstSafetyAnalysis
10351034
public:
10361035
DataflowDstSafetyAnalysis(BinaryFunction &BF,
10371036
MCPlusBuilder::AllocatorIdTy AllocId,
1038-
const ArrayRef<MCPhysReg> RegsToTrackInstsFor)
1037+
ArrayRef<MCPhysReg> RegsToTrackInstsFor)
10391038
: DstSafetyAnalysis(BF, RegsToTrackInstsFor), DFParent(BF, AllocId) {}
10401039

10411040
const DstState &getStateAfter(const MCInst &Inst) const override {
@@ -1119,7 +1118,7 @@ class CFGUnawareDstSafetyAnalysis : public DstSafetyAnalysis {
11191118
public:
11201119
CFGUnawareDstSafetyAnalysis(BinaryFunction &BF,
11211120
MCPlusBuilder::AllocatorIdTy AllocId,
1122-
const ArrayRef<MCPhysReg> RegsToTrackInstsFor)
1121+
ArrayRef<MCPhysReg> RegsToTrackInstsFor)
11231122
: DstSafetyAnalysis(BF, RegsToTrackInstsFor), BF(BF), AllocId(AllocId) {
11241123
StateAnnotationIndex =
11251124
BC.MIB->getOrCreateAnnotationIndex("CFGUnawareDstSafetyAnalysis");
@@ -1162,7 +1161,7 @@ class CFGUnawareDstSafetyAnalysis : public DstSafetyAnalysis {
11621161
std::shared_ptr<DstSafetyAnalysis>
11631162
DstSafetyAnalysis::create(BinaryFunction &BF,
11641163
MCPlusBuilder::AllocatorIdTy AllocId,
1165-
const ArrayRef<MCPhysReg> RegsToTrackInstsFor) {
1164+
ArrayRef<MCPhysReg> RegsToTrackInstsFor) {
11661165
if (BF.hasCFG())
11671166
return std::make_shared<DataflowDstSafetyAnalysis>(BF, AllocId,
11681167
RegsToTrackInstsFor);

0 commit comments

Comments
 (0)