ObjectFileTransformer.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- ObjectFileTransformer.h ----------------------------------*- C++ -*-===//
  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. #ifndef LLVM_DEBUGINFO_GSYM_OBJECTFILETRANSFORMER_H
  14. #define LLVM_DEBUGINFO_GSYM_OBJECTFILETRANSFORMER_H
  15. #include "llvm/Support/Error.h"
  16. namespace llvm {
  17. class raw_ostream;
  18. namespace object {
  19. class ObjectFile;
  20. }
  21. namespace gsym {
  22. class GsymCreator;
  23. class ObjectFileTransformer {
  24. public:
  25. /// Extract any object file data that is needed by the GsymCreator.
  26. ///
  27. /// The extracted information includes the UUID of the binary and converting
  28. /// all function symbols from any symbol tables into FunctionInfo objects.
  29. ///
  30. /// \param Obj The object file that contains the DWARF debug info.
  31. ///
  32. /// \param Log The stream to log warnings and non fatal issues to.
  33. ///
  34. /// \param Gsym The GSYM creator to populate with the function information
  35. /// from the debug info.
  36. ///
  37. /// \returns An error indicating any fatal issues that happen when parsing
  38. /// the DWARF, or Error::success() if all goes well.
  39. static llvm::Error convert(const object::ObjectFile &Obj,
  40. raw_ostream &Log,
  41. GsymCreator &Gsym);
  42. };
  43. } // namespace gsym
  44. } // namespace llvm
  45. #endif // LLVM_DEBUGINFO_GSYM_OBJECTFILETRANSFORMER_H
  46. #ifdef __GNUC__
  47. #pragma GCC diagnostic pop
  48. #endif