forked from OSchip/llvm-project
[Analysis] Apply clang-tidy fixes for readability-redundant-smartptr-get (NFC)
This commit is contained in:
parent
487629cc61
commit
9aa52ba574
|
@ -443,7 +443,7 @@ std::string llvm::formatCallSiteLocation(DebugLoc DLoc,
|
||||||
}
|
}
|
||||||
|
|
||||||
void llvm::addLocationToRemarks(OptimizationRemark &Remark, DebugLoc DLoc) {
|
void llvm::addLocationToRemarks(OptimizationRemark &Remark, DebugLoc DLoc) {
|
||||||
if (!DLoc.get()) {
|
if (!DLoc) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2366,7 +2366,7 @@ const LoopAccessInfo &LoopAccessLegacyAnalysis::getInfo(Loop *L) {
|
||||||
if (!LAI)
|
if (!LAI)
|
||||||
LAI = std::make_unique<LoopAccessInfo>(L, SE, TLI, AA, DT, LI);
|
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 {
|
void LoopAccessLegacyAnalysis::print(raw_ostream &OS, const Module *M) const {
|
||||||
|
|
|
@ -550,7 +550,7 @@ bool CacheCost::populateReferenceGroups(ReferenceGroupsTy &RefGroups) const {
|
||||||
|
|
||||||
bool Added = false;
|
bool Added = false;
|
||||||
for (ReferenceGroupTy &RefGroup : RefGroups) {
|
for (ReferenceGroupTy &RefGroup : RefGroups) {
|
||||||
const IndexedReference &Representative = *RefGroup.front().get();
|
const IndexedReference &Representative = *RefGroup.front();
|
||||||
LLVM_DEBUG({
|
LLVM_DEBUG({
|
||||||
dbgs() << "References:\n";
|
dbgs() << "References:\n";
|
||||||
dbgs().indent(2) << *R << "\n";
|
dbgs().indent(2) << *R << "\n";
|
||||||
|
|
|
@ -47,7 +47,7 @@ OptimizationRemarkEmitter::OptimizationRemarkEmitter(const Function *F)
|
||||||
bool OptimizationRemarkEmitter::invalidate(
|
bool OptimizationRemarkEmitter::invalidate(
|
||||||
Function &F, const PreservedAnalyses &PA,
|
Function &F, const PreservedAnalyses &PA,
|
||||||
FunctionAnalysisManager::Invalidator &Inv) {
|
FunctionAnalysisManager::Invalidator &Inv) {
|
||||||
if (OwnedBFI.get()) {
|
if (OwnedBFI) {
|
||||||
OwnedBFI.reset();
|
OwnedBFI.reset();
|
||||||
BFI = nullptr;
|
BFI = nullptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue