[PowerPC] Convert r+r instructions to r+i (pre and post RA)
[llvm-core.git] / tools / dsymutil / dsymutil.h
blob09053d1b1cc8d77b2f75f82999bc008d01d69ff8
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.
15 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H
18 #define LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H
20 #include "DebugMap.h"
21 #include "llvm/ADT/ArrayRef.h"
22 #include "llvm/ADT/StringRef.h"
23 #include "llvm/Support/Compiler.h"
24 #include "llvm/Support/ErrorOr.h"
25 #include <memory>
26 #include <string>
27 #include <vector>
29 namespace llvm {
30 namespace dsymutil {
32 struct LinkOptions {
33 /// Verbosity
34 bool Verbose = false;
36 /// Skip emitting output
37 bool NoOutput = false;
39 /// Do not unique types according to ODR
40 bool NoODR;
42 /// Do not check swiftmodule timestamp
43 bool NoTimestamp = false;
45 /// -oso-prepend-path
46 std::string PrependPath;
48 LinkOptions() = default;
51 /// \brief Extract the DebugMaps from the given file.
52 /// The file has to be a MachO object file. Multiple debug maps can be
53 /// returned when the file is universal (aka fat) binary.
54 ErrorOr<std::vector<std::unique_ptr<DebugMap>>>
55 parseDebugMap(StringRef InputFile, ArrayRef<std::string> Archs,
56 StringRef PrependPath, bool Verbose, bool InputIsYAML);
58 /// \brief Dump the symbol table
59 bool dumpStab(StringRef InputFile, ArrayRef<std::string> Archs,
60 StringRef PrependPath = "");
62 /// \brief Link the Dwarf debuginfo as directed by the passed DebugMap
63 /// \p DM into a DwarfFile named \p OutputFilename.
64 /// \returns false if the link failed.
65 bool linkDwarf(raw_fd_ostream &OutFile, const DebugMap &DM,
66 const LinkOptions &Options);
68 void warn(const Twine &Warning, const Twine &Context);
69 bool error(const Twine &Error, const Twine &Context);
71 } // end namespace dsymutil
72 } // end namespace llvm
74 #endif // LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H