forked from llvm/llvm-project
- Notifications
You must be signed in to change notification settings - Fork 339
/
Copy pathUnwindInfoSection.h
39 lines (30 loc) · 1.1 KB
/
UnwindInfoSection.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//===- UnwindInfoSection.h ------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLD_MACHO_UNWIND_INFO_H
#defineLLD_MACHO_UNWIND_INFO_H
#include"ConcatOutputSection.h"
#include"SyntheticSections.h"
#include"llvm/ADT/MapVector.h"
namespacelld::macho {
classUnwindInfoSection : publicSyntheticSection {
public:
// If all functions are free of unwind info, we can omit the unwind info
// section entirely.
boolisNeeded() constoverride { return !allEntriesAreOmitted; }
voidaddSymbol(const Defined *);
virtualvoidprepare() = 0;
protected:
UnwindInfoSection();
llvm::MapVector<std::pair<const InputSection *, uint64_t/*Defined::value*/>,
const Defined *>
symbols;
bool allEntriesAreOmitted = true;
};
UnwindInfoSection *makeUnwindInfoSection();
} // namespace lld::macho
#endif