dsymutil.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //===- tools/dsymutil/dsymutil.h - dsymutil high-level functionality ------===//
  2. //
  3. // The LLVM Linker
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. ///
  10. /// \file
  11. ///
  12. /// This file contains the class declaration for the code that parses STABS
  13. /// debug maps that are embedded in the binaries symbol tables.
  14. ///
  15. //===----------------------------------------------------------------------===//
  16. #ifndef LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H
  17. #define LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H
  18. #include "DebugMap.h"
  19. #include "llvm/ADT/StringRef.h"
  20. #include "llvm/Support/ErrorOr.h"
  21. #include <memory>
  22. namespace llvm {
  23. namespace dsymutil {
  24. struct LinkOptions {
  25. bool Verbose; ///< Verbosity
  26. bool NoOutput; ///< Skip emitting output
  27. LinkOptions() : Verbose(false), NoOutput(false) {}
  28. };
  29. /// \brief Extract the DebugMap from the given file.
  30. /// The file has to be a MachO object file.
  31. llvm::ErrorOr<std::unique_ptr<DebugMap>> parseDebugMap(StringRef InputFile,
  32. StringRef PrependPath,
  33. bool Verbose,
  34. bool InputIsYAML);
  35. /// \brief Link the Dwarf debuginfo as directed by the passed DebugMap
  36. /// \p DM into a DwarfFile named \p OutputFilename.
  37. /// \returns false if the link failed.
  38. bool linkDwarf(StringRef OutputFilename, const DebugMap &DM,
  39. const LinkOptions &Options);
  40. }
  41. }
  42. #endif // LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H