[LLD][COFF] Ignore DEBUG_S_XFGHASH_TYPE/VIRTUAL
[llvm-project.git] / lld / MachO / UnwindInfoSection.h
blob2be59534c88e237ffeda9ab233d49d1026016221
1 //===- UnwindInfoSection.h ------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLD_MACHO_UNWIND_INFO_H
10 #define LLD_MACHO_UNWIND_INFO_H
12 #include "ConcatOutputSection.h"
13 #include "SyntheticSections.h"
14 #include "llvm/ADT/MapVector.h"
16 #include "mach-o/compact_unwind_encoding.h"
18 namespace lld::macho {
20 class UnwindInfoSection : public SyntheticSection {
21 public:
22 // If all functions are free of unwind info, we can omit the unwind info
23 // section entirely.
24 bool isNeeded() const override { return !allEntriesAreOmitted; }
25 void addSymbol(const Defined *);
26 virtual void prepareRelocations() = 0;
28 protected:
29 UnwindInfoSection();
31 llvm::MapVector<std::pair<const InputSection *, uint64_t /*Defined::value*/>,
32 const Defined *>
33 symbols;
34 bool allEntriesAreOmitted = true;
37 UnwindInfoSection *makeUnwindInfoSection();
39 } // namespace lld::macho
41 #endif