#ifndef LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H
#define LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H
#include "DebugMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorOr.h"
#include <functional>
#include <memory>
namespace llvm {
namespace dsymutil {
struct LinkOptions {
bool Verbose; bool NoOutput; bool NoODR; bool Minimize; bool Update; std::function<StringRef (StringRef)> Translator;
std::string PrependPath; LinkOptions() : Verbose(false), NoOutput(false) {}
};
llvm::ErrorOr<std::vector<std::unique_ptr<DebugMap>>>
parseDebugMap(StringRef InputFile,
ArrayRef<std::string> Archs,
StringRef PrependPath = "", bool Verbose = false);
bool dumpStab(StringRef InputFile,
ArrayRef<std::string> Archs,
StringRef PrependPath = "");
bool linkDwarf(StringRef OutputFilename, const DebugMap &DM,
const LinkOptions &Options);
LLVM_ATTRIBUTE_NORETURN void exitDsymutil(int ExitStatus);
static inline std::string getArchName(const llvm::Triple &T) {
if (T.getArch() != llvm::Triple::thumb)
return T.getArchName();
return (llvm::Twine("arm") + T.getArchName().drop_front(5)).str();
}
}
}
#endif // LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H