summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/TextAPI/MachO/InterfaceFile.h3
-rw-r--r--llvm/include/llvm/TextAPI/MachO/Symbol.h11
-rw-r--r--llvm/include/llvm/TextAPI/MachO/Target.h2
3 files changed, 14 insertions, 2 deletions
diff --git a/llvm/include/llvm/TextAPI/MachO/InterfaceFile.h b/llvm/include/llvm/TextAPI/MachO/InterfaceFile.h
index 8bb6b5ff066..bd434e04b69 100644
--- a/llvm/include/llvm/TextAPI/MachO/InterfaceFile.h
+++ b/llvm/include/llvm/TextAPI/MachO/InterfaceFile.h
@@ -67,6 +67,9 @@ enum FileType : unsigned {
/// Text-based stub file (.tbd) version 3.0
TBD_V3 = 1U << 2,
+ /// Text-based stub file (.tbd) version 4.0
+ TBD_V4 = 1U << 3,
+
All = ~0U,
LLVM_MARK_AS_BITMASK_ENUM(/*LargestValue=*/All),
diff --git a/llvm/include/llvm/TextAPI/MachO/Symbol.h b/llvm/include/llvm/TextAPI/MachO/Symbol.h
index b6444fbd78f..1b1632c599c 100644
--- a/llvm/include/llvm/TextAPI/MachO/Symbol.h
+++ b/llvm/include/llvm/TextAPI/MachO/Symbol.h
@@ -38,7 +38,10 @@ enum class SymbolFlags : uint8_t {
/// Undefined
Undefined = 1U << 3,
- LLVM_MARK_AS_BITMASK_ENUM(/*LargestValue=*/Undefined),
+ /// Rexported
+ Rexported = 1U << 4,
+
+ LLVM_MARK_AS_BITMASK_ENUM(/*LargestValue=*/Rexported),
};
// clang-format on
@@ -50,7 +53,7 @@ enum class SymbolKind : uint8_t {
ObjectiveCInstanceVariable,
};
-using TargetList = SmallVector<Target, 20>;
+using TargetList = SmallVector<Target, 5>;
class Symbol {
public:
Symbol(SymbolKind Kind, StringRef Name, TargetList Targets, SymbolFlags Flags)
@@ -81,6 +84,10 @@ public:
return (Flags & SymbolFlags::Undefined) == SymbolFlags::Undefined;
}
+ bool isReexported() const {
+ return (Flags & SymbolFlags::Rexported) == SymbolFlags::Rexported;
+ }
+
using const_target_iterator = TargetList::const_iterator;
using const_target_range = llvm::iterator_range<const_target_iterator>;
const_target_range targets() const { return {Targets}; }
diff --git a/llvm/include/llvm/TextAPI/MachO/Target.h b/llvm/include/llvm/TextAPI/MachO/Target.h
index 74e900d812f..5fe44cb7d36 100644
--- a/llvm/include/llvm/TextAPI/MachO/Target.h
+++ b/llvm/include/llvm/TextAPI/MachO/Target.h
@@ -29,6 +29,8 @@ public:
explicit Target(const llvm::Triple &Triple)
: Arch(mapToArchitecture(Triple)), Platform(mapToPlatformKind(Triple)) {}
+ static llvm::Expected<Target> create(StringRef Target);
+
operator std::string() const;
Architecture Arch;
OpenPOWER on IntegriCloud