[llvm] f501659 - [TextAPI] don't write out empty/zeroed out min os (#72603)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 17 06:54:57 PST 2023


Author: Cyndy Ishida
Date: 2023-11-17T06:54:52-08:00
New Revision: f5016597687c404ea5205f1e40d80ce139d20d72

URL: https://github.com/llvm/llvm-project/commit/f5016597687c404ea5205f1e40d80ce139d20d72
DIFF: https://github.com/llvm/llvm-project/commit/f5016597687c404ea5205f1e40d80ce139d20d72.diff

LOG: [TextAPI] don't write out empty/zeroed out min os (#72603)

Added: 
    

Modified: 
    llvm/lib/TextAPI/TextStubV5.cpp

Removed: 
    


################################################################################
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