From 14415a3a5a58a122da29d3e33e9fa51a717c742c Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 28 Mar 2022 09:18:38 -0700 Subject: [PATCH] Apply clang-tidy fixes for readability-redundant-smartptr-get in InstrProfReader.cpp (NFC) --- llvm/lib/ProfileData/InstrProfReader.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp index 51fe691c0593..d3043075cb13 100644 --- a/llvm/lib/ProfileData/InstrProfReader.cpp +++ b/llvm/lib/ProfileData/InstrProfReader.cpp @@ -448,7 +448,7 @@ Error RawInstrProfReader::readHeader( return error(instrprof_error::bad_header); std::unique_ptr NewSymtab = std::make_unique(); - if (Error E = createSymtab(*NewSymtab.get())) + if (Error E = createSymtab(*NewSymtab)) return E; Symtab = std::move(NewSymtab); @@ -1002,16 +1002,16 @@ Error IndexedInstrProfReader::readHeader() { } InstrProfSymtab &IndexedInstrProfReader::getSymtab() { - if (Symtab.get()) - return *Symtab.get(); + if (Symtab) + return *Symtab; std::unique_ptr NewSymtab = std::make_unique(); - if (Error E = Index->populateSymtab(*NewSymtab.get())) { + if (Error E = Index->populateSymtab(*NewSymtab)) { consumeError(error(InstrProfError::take(std::move(E)))); } Symtab = std::move(NewSymtab); - return *Symtab.get(); + return *Symtab; } Expected