Path: blob/main/contrib/llvm-project/lld/MachO/UnwindInfoSection.h
34878 views
//===- UnwindInfoSection.h ------------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLD_MACHO_UNWIND_INFO_H9#define LLD_MACHO_UNWIND_INFO_H1011#include "ConcatOutputSection.h"12#include "SyntheticSections.h"13#include "llvm/ADT/MapVector.h"1415namespace lld::macho {1617class UnwindInfoSection : public SyntheticSection {18public:19// If all functions are free of unwind info, we can omit the unwind info20// section entirely.21bool isNeeded() const override { return !allEntriesAreOmitted; }22void addSymbol(const Defined *);23virtual void prepare() = 0;2425protected:26UnwindInfoSection();2728llvm::MapVector<std::pair<const InputSection *, uint64_t /*Defined::value*/>,29const Defined *>30symbols;31bool allEntriesAreOmitted = true;32};3334UnwindInfoSection *makeUnwindInfoSection();3536} // namespace lld::macho3738#endif394041