CodeViewYAMLSymbols.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- CodeViewYAMLSymbols.h - CodeView YAMLIO Symbol implementation ------===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // This file defines classes for handling the YAML representation of CodeView
  15. // Debug Info.
  16. //
  17. //===----------------------------------------------------------------------===//
  18. #ifndef LLVM_OBJECTYAML_CODEVIEWYAMLSYMBOLS_H
  19. #define LLVM_OBJECTYAML_CODEVIEWYAMLSYMBOLS_H
  20. #include "llvm/DebugInfo/CodeView/CodeView.h"
  21. #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
  22. #include "llvm/Support/Error.h"
  23. #include "llvm/Support/YAMLTraits.h"
  24. #include <memory>
  25. namespace llvm {
  26. namespace CodeViewYAML {
  27. namespace detail {
  28. struct SymbolRecordBase;
  29. } // end namespace detail
  30. struct SymbolRecord {
  31. std::shared_ptr<detail::SymbolRecordBase> Symbol;
  32. codeview::CVSymbol
  33. toCodeViewSymbol(BumpPtrAllocator &Allocator,
  34. codeview::CodeViewContainer Container) const;
  35. static Expected<SymbolRecord> fromCodeViewSymbol(codeview::CVSymbol Symbol);
  36. };
  37. } // end namespace CodeViewYAML
  38. } // end namespace llvm
  39. LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SymbolRecord)
  40. LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::SymbolRecord)
  41. #endif // LLVM_OBJECTYAML_CODEVIEWYAMLSYMBOLS_H
  42. #ifdef __GNUC__
  43. #pragma GCC diagnostic pop
  44. #endif