Skip to content

Commit f39f21e

Browse files
committed
Drop redundant const qualifier from ArrayRef<T>
1 parent c4a986e commit f39f21e

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
@@ -812,7 +812,7 @@ template <typename T> static void iterateOverInstrs(BinaryFunction &BF, T Fn) {
812812
}
813813

814814
static SmallVector<MCPhysReg>
815-
collectRegsToTrack(const ArrayRef<BriefReport<MCPhysReg>> Reports) {
815+
collectRegsToTrack(ArrayRef<BriefReport<MCPhysReg>> Reports) {
816816
SmallSet<MCPhysReg, 4> RegsToTrack;
817817
for (auto Report : Reports)
818818
if (Report.RequestedDetails)
@@ -856,7 +856,7 @@ void FunctionAnalysis::findUnsafeUses(
856856
}
857857

858858
void FunctionAnalysis::augmentUnsafeUseReports(
859-
const ArrayRef<BriefReport<MCPhysReg>> Reports) {
859+
ArrayRef<BriefReport<MCPhysReg>> Reports) {
860860
SmallVector<MCPhysReg> RegsToTrack = collectRegsToTrack(Reports);
861861
// Re-compute the analysis with register tracking.
862862
auto Analysis = SrcSafetyAnalysis::create(BF, AllocatorId, RegsToTrack);
@@ -974,7 +974,7 @@ void GadgetReport::generateReport(raw_ostream &OS,
974974
}
975975

976976
static void printRelatedInstrs(raw_ostream &OS, const MCInstReference Location,
977-
const ArrayRef<MCInstReference> RelatedInstrs) {
977+
ArrayRef<MCInstReference> RelatedInstrs) {
978978
const BinaryFunction &BF = *Location.getFunction();
979979
const BinaryContext &BC = BF.getBinaryContext();
980980

0 commit comments

Comments
 (0)