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