[Analysis] Apply clang-tidy fixes for readability-redundant-smartptr-get (NFC)

This commit is contained in:
Kazu Hirata 2022-03-20 18:21:40 -07:00
parent 487629cc61
commit 9aa52ba574
4 changed files with 4 additions and 4 deletions

View File

@ -443,7 +443,7 @@ std::string llvm::formatCallSiteLocation(DebugLoc DLoc,
}
void llvm::addLocationToRemarks(OptimizationRemark &Remark, DebugLoc DLoc) {
if (!DLoc.get()) {
if (!DLoc) {
return;
}

View File

@ -2366,7 +2366,7 @@ const LoopAccessInfo &LoopAccessLegacyAnalysis::getInfo(Loop *L) {
if (!LAI)
LAI = std::make_unique<LoopAccessInfo>(L, SE, TLI, AA, DT, LI);
return *LAI.get();
return *LAI;
}
void LoopAccessLegacyAnalysis::print(raw_ostream &OS, const Module *M) const {

View File

@ -550,7 +550,7 @@ bool CacheCost::populateReferenceGroups(ReferenceGroupsTy &RefGroups) const {
bool Added = false;
for (ReferenceGroupTy &RefGroup : RefGroups) {
const IndexedReference &Representative = *RefGroup.front().get();
const IndexedReference &Representative = *RefGroup.front();
LLVM_DEBUG({
dbgs() << "References:\n";
dbgs().indent(2) << *R << "\n";

View File

@ -47,7 +47,7 @@ OptimizationRemarkEmitter::OptimizationRemarkEmitter(const Function *F)
bool OptimizationRemarkEmitter::invalidate(
Function &F, const PreservedAnalyses &PA,
FunctionAnalysisManager::Invalidator &Inv) {
if (OwnedBFI.get()) {
if (OwnedBFI) {
OwnedBFI.reset();
BFI = nullptr;
}