[llvm] Remove redundant calls to std::unique_ptr<T>::get (NFC) (#113415)

This commit is contained in:
Kazu Hirata
2024-10-23 10:44:09 -07:00
committed by GitHub
parent f1be516223
commit 141574bacb
5 changed files with 11 additions and 11 deletions

View File

@@ -165,7 +165,7 @@ CodeGenData &CodeGenData::getInstance() {
Instance->publishOutlinedHashTree(Reader->releaseOutlinedHashTree());
}
});
return *(Instance.get());
return *Instance;
}
namespace IndexedCGData {

View File

@@ -1370,7 +1370,7 @@ void MachineOutliner::emitOutlinedHashTree(Module &M) {
Triple TT(M.getTargetTriple());
embedBufferInModule(
M, *Buffer.get(),
M, *Buffer,
getCodeGenDataSectionName(CG_outline, TT.getObjectFormat()));
}
}

View File

@@ -160,7 +160,7 @@ struct llvm::TimeTraceProfiler {
if (Stack.empty())
return;
Stack.back().get()->InstantEvents.emplace_back(TimeTraceProfilerEntry(
Stack.back()->InstantEvents.emplace_back(TimeTraceProfilerEntry(
ClockType::now(), TimePointType(), std::move(Name), Detail(),
TimeTraceEventType::InstantEvent));
}

View File

@@ -191,7 +191,7 @@ public:
bool allowedByRules(const SUnit *SU,
SmallVectorImpl<SchedGroup> &SyncPipe) const {
for (auto &Rule : Rules) {
if (!Rule.get()->apply(SU, Collection, SyncPipe))
if (!Rule->apply(SU, Collection, SyncPipe))
return false;
}
return true;

View File

@@ -84,7 +84,7 @@ TEST(DroppedVariableStats, BothDeleted) {
llvm::Any(const_cast<const llvm::Module *>(M.get())));
// This loop simulates an IR pass that drops debug information.
for (auto &F : *M.get()) {
for (auto &F : *M) {
for (auto &I : instructions(&F)) {
I.dropDbgRecords();
I.eraseFromParent();
@@ -141,7 +141,7 @@ TEST(DroppedVariableStats, DbgValLost) {
llvm::Any(const_cast<const llvm::Module *>(M.get())));
// This loop simulates an IR pass that drops debug information.
for (auto &F : *M.get()) {
for (auto &F : *M) {
for (auto &I : instructions(&F)) {
I.dropDbgRecords();
break;
@@ -198,7 +198,7 @@ TEST(DroppedVariableStats, UnrelatedScopes) {
llvm::Any(const_cast<const llvm::Module *>(M.get())));
// This loop simulates an IR pass that drops debug information.
for (auto &F : *M.get()) {
for (auto &F : *M) {
for (auto &I : instructions(&F)) {
I.dropDbgRecords();
break;
@@ -255,7 +255,7 @@ TEST(DroppedVariableStats, ChildScopes) {
llvm::Any(const_cast<const llvm::Module *>(M.get())));
// This loop simulates an IR pass that drops debug information.
for (auto &F : *M.get()) {
for (auto &F : *M) {
for (auto &I : instructions(&F)) {
I.dropDbgRecords();
break;
@@ -313,7 +313,7 @@ TEST(DroppedVariableStats, InlinedAt) {
llvm::Any(const_cast<const llvm::Module *>(M.get())));
// This loop simulates an IR pass that drops debug information.
for (auto &F : *M.get()) {
for (auto &F : *M) {
for (auto &I : instructions(&F)) {
I.dropDbgRecords();
break;
@@ -371,7 +371,7 @@ TEST(DroppedVariableStats, InlinedAtShared) {
llvm::Any(const_cast<const llvm::Module *>(M.get())));
// This loop simulates an IR pass that drops debug information.
for (auto &F : *M.get()) {
for (auto &F : *M) {
for (auto &I : instructions(&F)) {
I.dropDbgRecords();
break;
@@ -430,7 +430,7 @@ TEST(DroppedVariableStats, InlinedAtChild) {
llvm::Any(const_cast<const llvm::Module *>(M.get())));
// This loop simulates an IR pass that drops debug information.
for (auto &F : *M.get()) {
for (auto &F : *M) {
for (auto &I : instructions(&F)) {
I.dropDbgRecords();
break;