Skip to content

Commit bb7858a

Browse files
committed
Drop redundant const qualifier from ArrayRef<T>
1 parent 0a2f161 commit bb7858a

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
@@ -253,8 +253,7 @@ class ClobberingInfo : public ExtraInfo {
253253
SmallVector<MCInstReference> ClobberingInstrs;
254254

255255
public:
256-
ClobberingInfo(const ArrayRef<MCInstReference> Instrs)
257-
: ClobberingInstrs(Instrs) {}
256+
ClobberingInfo(ArrayRef<MCInstReference> Instrs) : ClobberingInstrs(Instrs) {}
258257

259258
void print(raw_ostream &OS, const MCInstReference Location) const override;
260259
};
@@ -298,7 +297,7 @@ class FunctionAnalysis {
298297
bool PacRetGadgetsOnly;
299298

300299
void findUnsafeUses(SmallVector<BriefReport<MCPhysReg>> &Reports);
301-
void augmentUnsafeUseReports(const ArrayRef<BriefReport<MCPhysReg>> Reports);
300+
void augmentUnsafeUseReports(ArrayRef<BriefReport<MCPhysReg>> Reports);
302301

303302
/// Process the reports which do not have to be augmented, and remove them
304303
/// 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)