Skip to content

Commit f501659

Browse files
authored
[TextAPI] don't write out empty/zeroed out min os (llvm#72603)
1 parent 44af592 commit f501659

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/TextAPI/TextStubV5.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,8 @@ Array serializeTargetInfo(const TargetList &ActiveTargets) {
767767
Array Targets;
768768
for (const auto Targ : ActiveTargets) {
769769
Object TargetInfo;
770-
TargetInfo[Keys[TBDKey::Deployment]] = Targ.MinDeployment.getAsString();
770+
if (!Targ.MinDeployment.empty())
771+
TargetInfo[Keys[TBDKey::Deployment]] = Targ.MinDeployment.getAsString();
771772
TargetInfo[Keys[TBDKey::Target]] = getFormattedStr(Targ);
772773
Targets.emplace_back(std::move(TargetInfo));
773774
}

0 commit comments

Comments
 (0)