[llvm] Remove redundant calls to std::unique_ptr<T>::get (NFC) (#113415)
This commit is contained in:
@@ -165,7 +165,7 @@ CodeGenData &CodeGenData::getInstance() {
|
||||
Instance->publishOutlinedHashTree(Reader->releaseOutlinedHashTree());
|
||||
}
|
||||
});
|
||||
return *(Instance.get());
|
||||
return *Instance;
|
||||
}
|
||||
|
||||
namespace IndexedCGData {
|
||||
|
||||
@@ -1370,7 +1370,7 @@ void MachineOutliner::emitOutlinedHashTree(Module &M) {
|
||||
|
||||
Triple TT(M.getTargetTriple());
|
||||
embedBufferInModule(
|
||||
M, *Buffer.get(),
|
||||
M, *Buffer,
|
||||
getCodeGenDataSectionName(CG_outline, TT.getObjectFormat()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user