llvm.org GIT mirror llvm / e3fbeeb
[TextAPI] TBD Reader/Writer (bot fixes) Trying if switching from a vector to an array will appeas the bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347824 91177308-0d34-0410-b5e6-96231b3b80d8 Juergen Ributzka 11 months ago
3 changed file(s) with 12 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
154154 /// This is used by the YAML writer to identify the specification it should
155155 /// use for writing the file.
156156 ///
157 /// \param Type The file type.
157 /// \param Kind The file type.
158158 void setFileType(FileType Kind) { FileKind = Kind; }
159159
160160 /// Get the file type.
262262
263263 /// Add a re-exported library.
264264 ///
265 /// \param Name The name of the library to re-export.
265 /// \param InstallName The name of the library to re-export.
266266 /// \param Architectures The set of architecture for which this applies.
267267 void addReexportedLibrary(StringRef InstallName,
268268 ArchitectureSet Architectures);
2222 return std::get<1>(lhs) < std::get<1>(rhs);
2323 }
2424
25 static ExportedSymbolSeq TBDv1Symbols({
25 static ExportedSymbol TBDv1Symbols[] = {
2626 {SymbolKind::GlobalSymbol, "$ld$hide$os9.0$_sym1", false, false},
2727 {SymbolKind::GlobalSymbol, "_sym1", false, false},
2828 {SymbolKind::GlobalSymbol, "_sym2", false, false},
4141 {SymbolKind::ObjectiveCInstanceVariable, "class1._ivar1", false, false},
4242 {SymbolKind::ObjectiveCInstanceVariable, "class1._ivar2", false, false},
4343 {SymbolKind::ObjectiveCInstanceVariable, "class1._ivar3", false, false},
44 });
44 };
4545
4646 namespace TBDv1 {
4747
104104 }
105105 llvm::sort(Exports.begin(), Exports.end());
106106
107 EXPECT_EQ(TBDv1Symbols.size(), Exports.size());
108 EXPECT_TRUE(std::equal(Exports.begin(), Exports.end(), TBDv1Symbols.begin()));
107 EXPECT_EQ(sizeof(TBDv1Symbols) / sizeof(ExportedSymbol), Exports.size());
108 EXPECT_TRUE(
109 std::equal(Exports.begin(), Exports.end(), std::begin(TBDv1Symbols)));
109110 }
110111
111112 TEST(TBDv1, ReadFile2) {
2222 return std::get<1>(lhs) < std::get<1>(rhs);
2323 }
2424
25 static ExportedSymbolSeq TBDv2Symbols({
25 static ExportedSymbol TBDv2Symbols[] = {
2626 {SymbolKind::GlobalSymbol, "$ld$hide$os9.0$_sym1", false, false},
2727 {SymbolKind::GlobalSymbol, "_sym1", false, false},
2828 {SymbolKind::GlobalSymbol, "_sym2", false, false},
4141 {SymbolKind::ObjectiveCInstanceVariable, "class1._ivar1", false, false},
4242 {SymbolKind::ObjectiveCInstanceVariable, "class1._ivar2", false, false},
4343 {SymbolKind::ObjectiveCInstanceVariable, "class1._ivar3", false, false},
44 });
44 };
4545
4646 namespace TBDv2 {
4747
106106 }
107107 llvm::sort(Exports.begin(), Exports.end());
108108
109 EXPECT_EQ(TBDv2Symbols.size(), Exports.size());
110 EXPECT_TRUE(std::equal(Exports.begin(), Exports.end(), TBDv2Symbols.begin()));
109 EXPECT_EQ(sizeof(TBDv2Symbols) / sizeof(ExportedSymbol), Exports.size());
110 EXPECT_TRUE(
111 std::equal(Exports.begin(), Exports.end(), std::begin(TBDv2Symbols)));
111112 }
112113
113114 TEST(TBDv2, ReadFile2) {