[PATCH] D121667: [llvm-cov] Assume repeat architectures for universal binaries

Keith Smiley via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 13:23:35 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG427ba2bcce1c: [llvm-cov] Assume repeat architectures for universal binaries (authored by keith).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121667/new/

https://reviews.llvm.org/D121667

Files:
  llvm/test/tools/llvm-cov/universal-binary.c
  llvm/tools/llvm-cov/CodeCoverage.cpp


Index: llvm/tools/llvm-cov/CodeCoverage.cpp
===================================================================
--- llvm/tools/llvm-cov/CodeCoverage.cpp
+++ llvm/tools/llvm-cov/CodeCoverage.cpp
@@ -883,6 +883,9 @@
         }
         CoverageArches.emplace_back(Arch);
       }
+      if (CoverageArches.size() == 1)
+        CoverageArches.insert(CoverageArches.end(), ObjectFilenames.size() - 1,
+                              CoverageArches[0]);
       if (CoverageArches.size() != ObjectFilenames.size()) {
         error("Number of architectures doesn't match the number of objects");
         return 1;
Index: llvm/test/tools/llvm-cov/universal-binary.c
===================================================================
--- llvm/test/tools/llvm-cov/universal-binary.c
+++ llvm/test/tools/llvm-cov/universal-binary.c
@@ -7,6 +7,8 @@
 // RUN: llvm-cov show %S/Inputs/universal-binary -instr-profile %t.profdata -path-equivalence=/tmp,%S %s -arch x86_64 | FileCheck %s
 
 // RUN: llvm-cov report %S/Inputs/universal-binary -arch x86_64 -object %S/Inputs/templateInstantiations.covmapping -arch i386 -instr-profile %t.profdata 2>&1 | FileCheck %s --check-prefix=COMBINED
+// RUN: llvm-cov report %S/Inputs/universal-binary -arch x86_64 -object %S/Inputs/templateInstantiations.covmapping -instr-profile %t.profdata 2>&1 | FileCheck %s --check-prefix=COMBINED
+// RUN: not llvm-cov report %S/Inputs/universal-binary -arch i386 -object %S/Inputs/templateInstantiations.covmapping -instr-profile %t.profdata 2>&1 | FileCheck %s --check-prefix=WRONG-ARCH
 // COMBINED: showTemplateInstantiations.cpp
 // COMBINED-NEXT: universal-binary.c
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121667.435310.patch
Type: text/x-patch
Size: 1640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220608/6ef1a4f9/attachment.bin>


More information about the llvm-commits mailing list