ObjectFileTransformer.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. struct CUInfo;
  23. class GsymCreator;
  24. class ObjectFileTransformer {
  25. public:
  26. /// Extract any object file data that is needed by the GsymCreator.
  27. ///
  28. /// The extracted information includes the UUID of the binary and converting
  29. /// all function symbols from any symbol tables into FunctionInfo objects.
  30. ///
  31. /// \param Obj The object file that contains the DWARF debug info.
  32. ///
  33. /// \param Log The stream to log warnings and non fatal issues to.
  34. ///
  35. /// \param Gsym The GSYM creator to populate with the function information
  36. /// from the debug info.
  37. ///
  38. /// \returns An error indicating any fatal issues that happen when parsing
  39. /// the DWARF, or Error::success() if all goes well.
  40. static llvm::Error convert(const object::ObjectFile &Obj,
  41. raw_ostream &Log,
  42. GsymCreator &Gsym);
  43. };
  44. } // namespace gsym
  45. } // namespace llvm
  46. #endif // #ifndef LLVM_DEBUGINFO_GSYM_OBJECTFILETRANSFORMER_H
  47. #ifdef __GNUC__
  48. #pragma GCC diagnostic pop
  49. #endif