[TextAPI] TBD Reader/Writer (bot fixes)

Trying if switching from a vector to an array will appeas the bots.

llvm-svn: 347824
This commit is contained in:
Juergen Ributzka 2018-11-29 01:55:57 +00:00
parent 7353a90b11
commit 5d1c6f8841
3 changed files with 12 additions and 10 deletions

View File

@ -155,7 +155,7 @@ public:
/// This is used by the YAML writer to identify the specification it should
/// use for writing the file.
///
/// \param Type The file type.
/// \param Kind The file type.
void setFileType(FileType Kind) { FileKind = Kind; }
/// Get the file type.
@ -263,7 +263,7 @@ public:
/// Add a re-exported library.
///
/// \param Name The name of the library to re-export.
/// \param InstallName The name of the library to re-export.
/// \param Architectures The set of architecture for which this applies.
void addReexportedLibrary(StringRef InstallName,
ArchitectureSet Architectures);

View File

@ -23,7 +23,7 @@ inline bool operator<(const ExportedSymbol &lhs, const ExportedSymbol &rhs) {
return std::get<1>(lhs) < std::get<1>(rhs);
}
static ExportedSymbolSeq TBDv1Symbols({
static ExportedSymbol TBDv1Symbols[] = {
{SymbolKind::GlobalSymbol, "$ld$hide$os9.0$_sym1", false, false},
{SymbolKind::GlobalSymbol, "_sym1", false, false},
{SymbolKind::GlobalSymbol, "_sym2", false, false},
@ -42,7 +42,7 @@ static ExportedSymbolSeq TBDv1Symbols({
{SymbolKind::ObjectiveCInstanceVariable, "class1._ivar1", false, false},
{SymbolKind::ObjectiveCInstanceVariable, "class1._ivar2", false, false},
{SymbolKind::ObjectiveCInstanceVariable, "class1._ivar3", false, false},
});
};
namespace TBDv1 {
@ -105,8 +105,9 @@ TEST(TBDv1, ReadFile) {
}
llvm::sort(Exports.begin(), Exports.end());
EXPECT_EQ(TBDv1Symbols.size(), Exports.size());
EXPECT_TRUE(std::equal(Exports.begin(), Exports.end(), TBDv1Symbols.begin()));
EXPECT_EQ(sizeof(TBDv1Symbols) / sizeof(ExportedSymbol), Exports.size());
EXPECT_TRUE(
std::equal(Exports.begin(), Exports.end(), std::begin(TBDv1Symbols)));
}
TEST(TBDv1, ReadFile2) {

View File

@ -23,7 +23,7 @@ inline bool operator<(const ExportedSymbol &lhs, const ExportedSymbol &rhs) {
return std::get<1>(lhs) < std::get<1>(rhs);
}
static ExportedSymbolSeq TBDv2Symbols({
static ExportedSymbol TBDv2Symbols[] = {
{SymbolKind::GlobalSymbol, "$ld$hide$os9.0$_sym1", false, false},
{SymbolKind::GlobalSymbol, "_sym1", false, false},
{SymbolKind::GlobalSymbol, "_sym2", false, false},
@ -42,7 +42,7 @@ static ExportedSymbolSeq TBDv2Symbols({
{SymbolKind::ObjectiveCInstanceVariable, "class1._ivar1", false, false},
{SymbolKind::ObjectiveCInstanceVariable, "class1._ivar2", false, false},
{SymbolKind::ObjectiveCInstanceVariable, "class1._ivar3", false, false},
});
};
namespace TBDv2 {
@ -107,8 +107,9 @@ TEST(TBDv2, ReadFile) {
}
llvm::sort(Exports.begin(), Exports.end());
EXPECT_EQ(TBDv2Symbols.size(), Exports.size());
EXPECT_TRUE(std::equal(Exports.begin(), Exports.end(), TBDv2Symbols.begin()));
EXPECT_EQ(sizeof(TBDv2Symbols) / sizeof(ExportedSymbol), Exports.size());
EXPECT_TRUE(
std::equal(Exports.begin(), Exports.end(), std::begin(TBDv2Symbols)));
}
TEST(TBDv2, ReadFile2) {