Skip to content

Commit 4c957e1

Browse files
committed
Drop redundant const qualifier from ArrayRef<T>
1 parent 12dce30 commit 4c957e1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

bolt/include/bolt/Passes/PAuthGadgetScanner.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,7 @@ class ClobberingInfo : public ExtraInfo {
255255
SmallVector<MCInstReference> ClobberingInstrs;
256256

257257
public:
258-
ClobberingInfo(const ArrayRef<MCInstReference> Instrs)
259-
: ClobberingInstrs(Instrs) {}
258+
ClobberingInfo(ArrayRef<MCInstReference> Instrs) : ClobberingInstrs(Instrs) {}
260259

261260
void print(raw_ostream &OS, const MCInstReference Location) const override;
262261
};
@@ -300,7 +299,7 @@ class FunctionAnalysis {
300299
bool PacRetGadgetsOnly;
301300

302301
void findUnsafeUses(SmallVector<BriefReport<MCPhysReg>> &Reports);
303-
void augmentUnsafeUseReports(const ArrayRef<BriefReport<MCPhysReg>> Reports);
302+
void augmentUnsafeUseReports(ArrayRef<BriefReport<MCPhysReg>> Reports);
304303

305304
/// Process the reports which do not have to be augmented, and remove them
306305
/// from Reports.

bolt/lib/Passes/PAuthGadgetScanner.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ template <typename T> static void iterateOverInstrs(BinaryFunction &BF, T Fn) {
807807
}
808808

809809
static SmallVector<MCPhysReg>
810-
collectRegsToTrack(const ArrayRef<BriefReport<MCPhysReg>> Reports) {
810+
collectRegsToTrack(ArrayRef<BriefReport<MCPhysReg>> Reports) {
811811
SmallSet<MCPhysReg, 4> RegsToTrack;
812812
for (auto Report : Reports)
813813
if (Report.RequestedDetails)
@@ -851,7 +851,7 @@ void FunctionAnalysis::findUnsafeUses(
851851
}
852852

853853
void FunctionAnalysis::augmentUnsafeUseReports(
854-
const ArrayRef<BriefReport<MCPhysReg>> Reports) {
854+
ArrayRef<BriefReport<MCPhysReg>> Reports) {
855855
SmallVector<MCPhysReg> RegsToTrack = collectRegsToTrack(Reports);
856856
// Re-compute the analysis with register tracking.
857857
auto Analysis = SrcSafetyAnalysis::create(BF, AllocatorId, RegsToTrack);
@@ -969,7 +969,7 @@ void GadgetReport::generateReport(raw_ostream &OS,
969969
}
970970

971971
static void printRelatedInstrs(raw_ostream &OS, const MCInstReference Location,
972-
const ArrayRef<MCInstReference> RelatedInstrs) {
972+
ArrayRef<MCInstReference> RelatedInstrs) {
973973
const BinaryFunction &BF = *Location.getFunction();
974974
const BinaryContext &BC = BF.getBinaryContext();
975975

0 commit comments

Comments
 (0)