| 1 | //===- GsymCreatorV1.h ------------------------------------------*- C++ -*-===// |
|---|---|
| 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 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef LLVM_DEBUGINFO_GSYM_GSYMCREATORV1_H |
| 10 | #define LLVM_DEBUGINFO_GSYM_GSYMCREATORV1_H |
| 11 | |
| 12 | #include "llvm/DebugInfo/GSYM/GsymCreator.h" |
| 13 | #include "llvm/DebugInfo/GSYM/Header.h" |
| 14 | |
| 15 | namespace llvm { |
| 16 | namespace gsym { |
| 17 | |
| 18 | class LLVM_ABI GsymCreatorV1 : public GsymCreator { |
| 19 | uint64_t calculateHeaderAndTableSize() const override; |
| 20 | std::unique_ptr<GsymCreator> createNew(bool Quiet) const override { |
| 21 | return std::make_unique<GsymCreatorV1>(args&: Quiet); |
| 22 | } |
| 23 | |
| 24 | public: |
| 25 | GsymCreatorV1(bool Quiet = false) : GsymCreator(Quiet) {} |
| 26 | |
| 27 | uint8_t getStringOffsetSize() const override { |
| 28 | return Header::getStringOffsetSize(); |
| 29 | } |
| 30 | llvm::Error encode(FileWriter &O) const override; |
| 31 | }; |
| 32 | |
| 33 | } // namespace gsym |
| 34 | } // namespace llvm |
| 35 | |
| 36 | #endif // LLVM_DEBUGINFO_GSYM_GSYMCREATORV1_H |
| 37 |