aboutsummaryrefslogtreecommitdiff
path: root/tools/dsymutil/MachOUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dsymutil/MachOUtils.h')
-rw-r--r--tools/dsymutil/MachOUtils.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/tools/dsymutil/MachOUtils.h b/tools/dsymutil/MachOUtils.h
index 0db8ed1a1e31..a8be89e906b5 100644
--- a/tools/dsymutil/MachOUtils.h
+++ b/tools/dsymutil/MachOUtils.h
@@ -10,6 +10,7 @@
#define LLVM_TOOLS_DSYMUTIL_MACHOUTILS_H
#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/FileSystem.h"
#include <string>
namespace llvm {
@@ -20,12 +21,20 @@ class DebugMap;
struct LinkOptions;
namespace MachOUtils {
-struct ArchAndFilename {
- std::string Arch, Path;
- ArchAndFilename(StringRef Arch, StringRef Path) : Arch(Arch), Path(Path) {}
+struct ArchAndFile {
+ std::string Arch;
+ // Optional because TempFile has no default constructor.
+ Optional<llvm::sys::fs::TempFile> File;
+
+ llvm::Error createTempFile();
+ llvm::StringRef path() const;
+
+ ArchAndFile(StringRef Arch) : Arch(Arch) {}
+ ArchAndFile(ArchAndFile &&A) = default;
+ ~ArchAndFile();
};
-bool generateUniversalBinary(SmallVectorImpl<ArchAndFilename> &ArchFiles,
+bool generateUniversalBinary(SmallVectorImpl<ArchAndFile> &ArchFiles,
StringRef OutputFileName, const LinkOptions &,
StringRef SDKPath);