1 //===-- MachOUtils.h - Mach-o specific helpers for dsymutil --------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
8 #ifndef LLVM_TOOLS_DSYMUTIL_MACHOUTILS_H
9 #define LLVM_TOOLS_DSYMUTIL_MACHOUTILS_H
11 #include "SymbolMap.h"
13 #include "llvm/ADT/StringRef.h"
14 #include "llvm/Support/FileSystem.h"
24 namespace MachOUtils
{
28 std::unique_ptr
<llvm::sys::fs::TempFile
> File
;
30 llvm::Error
createTempFile();
31 llvm::StringRef
path() const;
33 ArchAndFile(StringRef Arch
) : Arch(Arch
) {}
34 ArchAndFile(ArchAndFile
&&A
) = default;
35 ArchAndFile
&operator=(ArchAndFile
&&A
) = default;
39 bool generateUniversalBinary(SmallVectorImpl
<ArchAndFile
> &ArchFiles
,
40 StringRef OutputFileName
, const LinkOptions
&,
43 bool generateDsymCompanion(const DebugMap
&DM
, SymbolMapTranslator
&Translator
,
44 MCStreamer
&MS
, raw_fd_ostream
&OutFile
);
46 std::string
getArchName(StringRef Arch
);
47 } // namespace MachOUtils
48 } // namespace dsymutil
50 #endif // LLVM_TOOLS_DSYMUTIL_MACHOUTILS_H