[llvm] [TextAPI] don't write out empty/zeroed out min os (PR #72603)
Cyndy Ishida via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 16 19:03:11 PST 2023
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/72603
None
>From 60d53cffe19c6017a7ae18b5b091ac89689cfa60 Mon Sep 17 00:00:00 2001
From: Cyndy Ishida <cyndy_ishida at apple.com>
Date: Thu, 16 Nov 2023 19:00:57 -0800
Subject: [PATCH] [TextAPI] don't write out empty/zeroed out min os
---
llvm/lib/TextAPI/TextStubV5.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/llvm/lib/TextAPI/TextStubV5.cpp b/llvm/lib/TextAPI/TextStubV5.cpp
index 3546c699bce0ea5..2f82bc03480b942 100644
--- a/llvm/lib/TextAPI/TextStubV5.cpp
+++ b/llvm/lib/TextAPI/TextStubV5.cpp
@@ -767,7 +767,8 @@ Array serializeTargetInfo(const TargetList &ActiveTargets) {
Array Targets;
for (const auto Targ : ActiveTargets) {
Object TargetInfo;
- TargetInfo[Keys[TBDKey::Deployment]] = Targ.MinDeployment.getAsString();
+ if (!Targ.MinDeployment.empty())
+ TargetInfo[Keys[TBDKey::Deployment]] = Targ.MinDeployment.getAsString();
TargetInfo[Keys[TBDKey::Target]] = getFormattedStr(Targ);
Targets.emplace_back(std::move(TargetInfo));
}
More information about the llvm-commits
mailing list