From fe013be447cd855ccaf6094a1d06aea570450629 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 2 Sep 2023 23:17:18 +0200 Subject: Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-17-init-19304-gd0b54bb50e51, the last commit before the upstream release/17.x branch was created. PR: 273753 MFC after: 1 month (cherry picked from commit 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e) --- .../llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'contrib/llvm-project/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp') diff --git a/contrib/llvm-project/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp b/contrib/llvm-project/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp index d313864e2ddb..05737323314a 100644 --- a/contrib/llvm-project/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp +++ b/contrib/llvm-project/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp @@ -18,7 +18,6 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/Triple.h" #include "llvm/Object/Archive.h" #include "llvm/Object/Binary.h" #include "llvm/Object/COFF.h" @@ -36,6 +35,7 @@ #include "llvm/Support/MathExtras.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/TargetParser/Triple.h" #include using namespace llvm; @@ -955,7 +955,7 @@ static Expected> lookupSections(ObjectFile &OF, static Expected> loadBinaryFormat(std::unique_ptr Bin, StringRef Arch, StringRef CompilationDir = "", - std::optional *BinaryID = nullptr) { + object::BuildIDRef *BinaryID = nullptr) { std::unique_ptr OF; if (auto *Universal = dyn_cast(Bin.get())) { // If we have a universal binary, try to look up the object for the @@ -1151,14 +1151,14 @@ BinaryCoverageReader::create( return std::move(Readers); } - std::optional BinaryID; + object::BuildIDRef BinaryID; auto ReaderOrErr = loadBinaryFormat(std::move(Bin), Arch, CompilationDir, BinaryIDs ? &BinaryID : nullptr); if (!ReaderOrErr) return ReaderOrErr.takeError(); Readers.push_back(std::move(ReaderOrErr.get())); - if (BinaryID) - BinaryIDs->push_back(*BinaryID); + if (!BinaryID.empty()) + BinaryIDs->push_back(BinaryID); return std::move(Readers); } -- cgit v1.2.3