CodeViewYAMLSymbols.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //===- CodeViewYAMLSymbols.h - CodeView YAMLIO Symbol implementation ------===//
  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. // This file defines classes for handling the YAML representation of CodeView
  10. // Debug Info.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_OBJECTYAML_CODEVIEWYAMLSYMBOLS_H
  14. #define LLVM_OBJECTYAML_CODEVIEWYAMLSYMBOLS_H
  15. #include "llvm/DebugInfo/CodeView/CodeView.h"
  16. #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
  17. #include "llvm/Support/Error.h"
  18. #include "llvm/Support/YAMLTraits.h"
  19. #include <memory>
  20. namespace llvm {
  21. namespace CodeViewYAML {
  22. namespace detail {
  23. struct SymbolRecordBase;
  24. } // end namespace detail
  25. struct SymbolRecord {
  26. std::shared_ptr<detail::SymbolRecordBase> Symbol;
  27. codeview::CVSymbol
  28. toCodeViewSymbol(BumpPtrAllocator &Allocator,
  29. codeview::CodeViewContainer Container) const;
  30. static Expected<SymbolRecord> fromCodeViewSymbol(codeview::CVSymbol Symbol);
  31. };
  32. } // end namespace CodeViewYAML
  33. } // end namespace llvm
  34. LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SymbolRecord)
  35. LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::SymbolRecord)
  36. #endif // LLVM_OBJECTYAML_CODEVIEWYAMLSYMBOLS_H