blob: 6ade86f0163ccc2800122c4ccd4731d8aab42d14 (
plain) (
blame)
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
|
//===- lib/ReaderWriter/ELF/MipsELFFlagsMerger.h --------------------------===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLD_READER_WRITER_ELF_MIPS_MIPS_ELF_FLAGS_MERGER_H
#define LLD_READER_WRITER_ELF_MIPS_MIPS_ELF_FLAGS_MERGER_H
#include <mutex>
#include <system_error>
namespace lld {
namespace elf {
class MipsELFFlagsMerger {
public:
MipsELFFlagsMerger(bool is64Bits);
uint32_t getMergedELFFlags() const;
/// \brief Merge saved ELF header flags and the new set of flags.
std::error_code merge(uint8_t newClass, uint32_t newFlags);
private:
const bool _is64Bit;
std::mutex _mutex;
uint32_t _flags;
};
} // namespace elf
} // namespace lld
#endif
|