diff options
author | Kyle Krüger <7158199+kykrueger@users.noreply.github.com> | 2025-08-29 14:52:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-29 12:52:07 +0000 |
commit | 5d0294fcb61560a228e230e8a477fc44746ec62b (patch) | |
tree | 5f78256d7a350dc87ec344ad4c4441f579c1f81d /llvm/tools/llvm-cov/SourceCoverageView.cpp | |
parent | 88b71e20488ae0987b7ec7cfa9d49d9358b1f38c (diff) | |
download | llvm-5d0294fcb61560a228e230e8a477fc44746ec62b.zip llvm-5d0294fcb61560a228e230e8a477fc44746ec62b.tar.gz llvm-5d0294fcb61560a228e230e8a477fc44746ec62b.tar.bz2 |
[llvm] Support building with c++23 (#154372)
closes #154331
This PR addresses all minimum changes needed to compile LLVM and MLIR
with the c++23 standard.
It is a work in progress and to be reviewed for better methods of
handling the parts of the build broken by c++23.
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageView.cpp')
-rw-r--r-- | llvm/tools/llvm-cov/SourceCoverageView.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.cpp b/llvm/tools/llvm-cov/SourceCoverageView.cpp index dfecddf..336ed47 100644 --- a/llvm/tools/llvm-cov/SourceCoverageView.cpp +++ b/llvm/tools/llvm-cov/SourceCoverageView.cpp @@ -21,6 +21,23 @@ using namespace llvm; +ExpansionView::ExpansionView(const CounterMappingRegion &Region, + std::unique_ptr<SourceCoverageView> View) + : Region(Region), View(std::move(View)) {} + +ExpansionView::ExpansionView(ExpansionView &&RHS) + : Region(std::move(RHS.Region)), View(std::move(RHS.View)) {} + +ExpansionView &ExpansionView::operator=(ExpansionView &&RHS) { + Region = std::move(RHS.Region); + View = std::move(RHS.View); + return *this; +} + +InstantiationView::InstantiationView(StringRef FunctionName, unsigned Line, + std::unique_ptr<SourceCoverageView> View) + : FunctionName(FunctionName), Line(Line), View(std::move(View)) {} + void CoveragePrinter::StreamDestructor::operator()(raw_ostream *OS) const { if (OS == &outs()) return; |