Skip to content

Commit 451f28a

Browse files
[llvm] Remove redundant calls to std::unique_ptr<T>::get (NFC)
1 parent 973fa98 commit 451f28a

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

llvm/lib/CGData/CodeGenData.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ CodeGenData &CodeGenData::getInstance() {
165165
Instance->publishOutlinedHashTree(Reader->releaseOutlinedHashTree());
166166
}
167167
});
168-
return *(Instance.get());
168+
return *Instance;
169169
}
170170

171171
namespace IndexedCGData {

llvm/lib/CodeGen/MachineOutliner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ void MachineOutliner::emitOutlinedHashTree(Module &M) {
13701370

13711371
Triple TT(M.getTargetTriple());
13721372
embedBufferInModule(
1373-
M, *Buffer.get(),
1373+
M, *Buffer,
13741374
getCodeGenDataSectionName(CG_outline, TT.getObjectFormat()));
13751375
}
13761376
}

llvm/lib/Support/TimeProfiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ struct llvm::TimeTraceProfiler {
160160
if (Stack.empty())
161161
return;
162162

163-
Stack.back().get()->InstantEvents.emplace_back(TimeTraceProfilerEntry(
163+
Stack.back()->InstantEvents.emplace_back(TimeTraceProfilerEntry(
164164
ClockType::now(), TimePointType(), std::move(Name), Detail(),
165165
TimeTraceEventType::InstantEvent));
166166
}

llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class SchedGroup {
191191
bool allowedByRules(const SUnit *SU,
192192
SmallVectorImpl<SchedGroup> &SyncPipe) const {
193193
for (auto &Rule : Rules) {
194-
if (!Rule.get()->apply(SU, Collection, SyncPipe))
194+
if (!Rule->apply(SU, Collection, SyncPipe))
195195
return false;
196196
}
197197
return true;

llvm/unittests/IR/DroppedVariableStatsTest.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ TEST(DroppedVariableStats, BothDeleted) {
8484
llvm::Any(const_cast<const llvm::Module *>(M.get())));
8585

8686
// This loop simulates an IR pass that drops debug information.
87-
for (auto &F : *M.get()) {
87+
for (auto &F : *M) {
8888
for (auto &I : instructions(&F)) {
8989
I.dropDbgRecords();
9090
I.eraseFromParent();
@@ -141,7 +141,7 @@ TEST(DroppedVariableStats, DbgValLost) {
141141
llvm::Any(const_cast<const llvm::Module *>(M.get())));
142142

143143
// This loop simulates an IR pass that drops debug information.
144-
for (auto &F : *M.get()) {
144+
for (auto &F : *M) {
145145
for (auto &I : instructions(&F)) {
146146
I.dropDbgRecords();
147147
break;
@@ -198,7 +198,7 @@ TEST(DroppedVariableStats, UnrelatedScopes) {
198198
llvm::Any(const_cast<const llvm::Module *>(M.get())));
199199

200200
// This loop simulates an IR pass that drops debug information.
201-
for (auto &F : *M.get()) {
201+
for (auto &F : *M) {
202202
for (auto &I : instructions(&F)) {
203203
I.dropDbgRecords();
204204
break;
@@ -255,7 +255,7 @@ TEST(DroppedVariableStats, ChildScopes) {
255255
llvm::Any(const_cast<const llvm::Module *>(M.get())));
256256

257257
// This loop simulates an IR pass that drops debug information.
258-
for (auto &F : *M.get()) {
258+
for (auto &F : *M) {
259259
for (auto &I : instructions(&F)) {
260260
I.dropDbgRecords();
261261
break;
@@ -313,7 +313,7 @@ TEST(DroppedVariableStats, InlinedAt) {
313313
llvm::Any(const_cast<const llvm::Module *>(M.get())));
314314

315315
// This loop simulates an IR pass that drops debug information.
316-
for (auto &F : *M.get()) {
316+
for (auto &F : *M) {
317317
for (auto &I : instructions(&F)) {
318318
I.dropDbgRecords();
319319
break;
@@ -371,7 +371,7 @@ TEST(DroppedVariableStats, InlinedAtShared) {
371371
llvm::Any(const_cast<const llvm::Module *>(M.get())));
372372

373373
// This loop simulates an IR pass that drops debug information.
374-
for (auto &F : *M.get()) {
374+
for (auto &F : *M) {
375375
for (auto &I : instructions(&F)) {
376376
I.dropDbgRecords();
377377
break;
@@ -430,7 +430,7 @@ TEST(DroppedVariableStats, InlinedAtChild) {
430430
llvm::Any(const_cast<const llvm::Module *>(M.get())));
431431

432432
// This loop simulates an IR pass that drops debug information.
433-
for (auto &F : *M.get()) {
433+
for (auto &F : *M) {
434434
for (auto &I : instructions(&F)) {
435435
I.dropDbgRecords();
436436
break;

0 commit comments

Comments
 (0)