1 //===- tools/dsymutil/dsymutil.h - dsymutil high-level functionality ------===//
3 // The LLVM Compiler Infrastructure
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 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H
18 #define LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H
21 #include "LinkUtils.h"
22 #include "llvm/ADT/ArrayRef.h"
23 #include "llvm/ADT/StringRef.h"
24 #include "llvm/Support/Compiler.h"
25 #include "llvm/Support/ErrorOr.h"
33 /// Extract the DebugMaps from the given file.
34 /// The file has to be a MachO object file. Multiple debug maps can be
35 /// returned when the file is universal (aka fat) binary.
36 ErrorOr<std::vector<std::unique_ptr<DebugMap>>>
37 parseDebugMap(StringRef InputFile, ArrayRef<std::string> Archs,
38 StringRef PrependPath, bool PaperTrailWarnings, bool Verbose,
41 /// Dump the symbol table
42 bool dumpStab(StringRef InputFile, ArrayRef<std::string> Archs,
43 StringRef PrependPath = "");
45 /// Link the Dwarf debug info as directed by the passed DebugMap \p DM into a
46 /// DwarfFile named \p OutputFilename. \returns false if the link failed.
47 bool linkDwarf(raw_fd_ostream &OutFile, const DebugMap &DM,
48 const LinkOptions &Options);
50 } // end namespace dsymutil
51 } // end namespace llvm
53 #endif // LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H