aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/TextAPI
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2021-01-15 09:11:31 -0800
committerPaul Robinson <paul.robinson@sony.com>2021-01-22 15:07:41 -0800
commit25fefa5a098e958888496735f793fd01f3e82874 (patch)
tree6d05d7c8eec39d1ca20bc8724fc03635ba607a3a /llvm/unittests/TextAPI
parent6ea7ecbb72aa139ebb1a343a6d544b84b99f1f3a (diff)
downloadllvm-25fefa5a098e958888496735f793fd01f3e82874.zip
llvm-25fefa5a098e958888496735f793fd01f3e82874.tar.gz
llvm-25fefa5a098e958888496735f793fd01f3e82874.tar.bz2
[RGT][TextAPI] Remove a zero-trip loop and the assertions within it
Found by the Rotten Green Tests project. Differential Revision: https://reviews.llvm.org/D95259
Diffstat (limited to 'llvm/unittests/TextAPI')
-rw-r--r--llvm/unittests/TextAPI/TextStubV4Tests.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/unittests/TextAPI/TextStubV4Tests.cpp b/llvm/unittests/TextAPI/TextStubV4Tests.cpp
index 0ab9c52..403e2d6 100644
--- a/llvm/unittests/TextAPI/TextStubV4Tests.cpp
+++ b/llvm/unittests/TextAPI/TextStubV4Tests.cpp
@@ -255,18 +255,9 @@ TEST(TBDv4, ReadMultipleDocuments) {
{Targets[0], Targets[2]});
EXPECT_EQ(1U, File->reexportedLibraries().size());
EXPECT_EQ(reexport, File->reexportedLibraries().front());
- ExportedSymbolSeq Exports;
- for (const auto *Sym : File->symbols()) {
- EXPECT_FALSE(Sym->isWeakReferenced());
- EXPECT_FALSE(Sym->isUndefined());
- Exports.emplace_back(ExportedSymbol{Sym->getKind(), Sym->getName().str(),
- Sym->isWeakDefined(),
- Sym->isThreadLocalValue()});
- }
- EXPECT_EQ(0U, Exports.size());
+ EXPECT_TRUE(File->symbols().empty());
// Check Inlined Document
- Exports.clear();
Targets.clear();
Uuids.clear();
PlatformKind Platform = PlatformKind::macOS;
@@ -292,6 +283,7 @@ TEST(TBDv4, ReadMultipleDocuments) {
EXPECT_TRUE(Document->isApplicationExtensionSafe());
EXPECT_FALSE(Document->isInstallAPI());
+ ExportedSymbolSeq Exports;
ExportedSymbolSeq Reexports, Undefineds;
for (const auto *Sym : Document->symbols()) {
ExportedSymbol Temp =