Skip to content

Commit c8d3e61

Browse files
[DWARFCFIChecker] Use llvm::unique (NFC) (#148766)
While I am at it, this patch replaces resize with erase, which is a lot shorter and idiomatic.
1 parent c4450aa commit c8d3e61

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/DWARFCFIChecker/Registers.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ inline SmallVector<MCPhysReg> getSuperRegs(const MCRegisterInfo *MCRI) {
3838
}
3939

4040
sort(SuperRegs.begin(), SuperRegs.end());
41-
SuperRegs.resize(std::distance(
42-
SuperRegs.begin(), std::unique(SuperRegs.begin(), SuperRegs.end())));
41+
SuperRegs.erase(llvm::unique(SuperRegs), SuperRegs.end());
4342
return SuperRegs;
4443
}
4544

0 commit comments

Comments
 (0)