From 89ea38c62f187893298efaea88bc156ecd4c518d Mon Sep 17 00:00:00 2001 From: Frederic Riss Date: Tue, 25 Aug 2015 18:43:11 +0000 Subject: [PATCH] Revert "[dsymutil] Rewrite thumb triple names in user visible messages." This reverts commit r245960. Multiple bots are failing on the new test. It seemd like llvm-dsymutil exits with an error. Investigating. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245964 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/tools/dsymutil/ARM/empty-map.test | 2 +- test/tools/dsymutil/ARM/fat-arch-name.test | 21 --------------------- tools/dsymutil/MachOUtils.cpp | 7 ------- tools/dsymutil/MachOUtils.h | 2 -- tools/dsymutil/dsymutil.cpp | 3 +-- 5 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 test/tools/dsymutil/ARM/fat-arch-name.test diff --git a/test/tools/dsymutil/ARM/empty-map.test b/test/tools/dsymutil/ARM/empty-map.test index 54d9a35cc6e..4cc0e5f67b5 100644 --- a/test/tools/dsymutil/ARM/empty-map.test +++ b/test/tools/dsymutil/ARM/empty-map.test @@ -5,4 +5,4 @@ triple: 'thumbv7-apple-darwin' ... -# CHECK: warning: no debug symbols in executable (-arch armv7) +# CHECK: warning: no debug symbols in executable (-arch thumbv7) diff --git a/test/tools/dsymutil/ARM/fat-arch-name.test b/test/tools/dsymutil/ARM/fat-arch-name.test deleted file mode 100644 index a8b7ca92c58..00000000000 --- a/test/tools/dsymutil/ARM/fat-arch-name.test +++ /dev/null @@ -1,21 +0,0 @@ -# REQUIRES: object-emission -# RUN: llvm-dsymutil %p/../Inputs/fat-test.arm.dylib -o %t.dSYM -verbose 2>&1 | FileCheck %s - -# We detect thumb triples from the binaries, because those are the only ones -# that are guaranteed to be able to generate a Target instance (for example -# we would detect armv7m-apple-darwin as non-thumb triple, but you can't -# instantiate a Target from that). In the user-visible architecture names, and -# in the lipo invocation, we need to rewrite the thumb arch names to the arm -# ones. - -# CHECK: warning: no debug symbols in executable (-arch armv7) - -# CHECK: warning: no debug symbols in executable (-arch armv7s) - -# CHECK: warning: no debug symbols in executable (-arch arm64) - -# CHECK: Running lipo -# CHECK-NEXT: lipo -create -# CHECK-SAME: -segalign armv7 -# CHECK-SAME: -segalign armv7s -# CHECK-SAME: -segalign arm64 diff --git a/tools/dsymutil/MachOUtils.cpp b/tools/dsymutil/MachOUtils.cpp index 8f4d2610b8f..15605fe00eb 100644 --- a/tools/dsymutil/MachOUtils.cpp +++ b/tools/dsymutil/MachOUtils.cpp @@ -17,12 +17,6 @@ namespace llvm { namespace dsymutil { namespace MachOUtils { -std::string getArchName(StringRef Arch) { - if (Arch.startswith("thumb")) - return (llvm::Twine("arm") + Arch.drop_front(5)).str(); - return Arch; -} - static bool runLipo(SmallVectorImpl &Args) { auto Path = sys::findProgramByName("lipo"); @@ -70,7 +64,6 @@ bool generateUniversalBinary(SmallVectorImpl &ArchFiles, // Align segments to match dsymutil-classic alignment for (auto &Thin : ArchFiles) { - Thin.Arch = getArchName(Thin.Arch); Args.push_back("-segalign"); Args.push_back(Thin.Arch.c_str()); Args.push_back("20"); diff --git a/tools/dsymutil/MachOUtils.h b/tools/dsymutil/MachOUtils.h index d6b6f3d61c3..f1b2ad9dadd 100644 --- a/tools/dsymutil/MachOUtils.h +++ b/tools/dsymutil/MachOUtils.h @@ -24,8 +24,6 @@ struct ArchAndFilename { bool generateUniversalBinary(SmallVectorImpl &ArchFiles, StringRef OutputFileName, const LinkOptions &); - -std::string getArchName(StringRef Arch); } } } diff --git a/tools/dsymutil/dsymutil.cpp b/tools/dsymutil/dsymutil.cpp index 9e112ba0727..3d9851eca7e 100644 --- a/tools/dsymutil/dsymutil.cpp +++ b/tools/dsymutil/dsymutil.cpp @@ -301,8 +301,7 @@ int main(int argc, char **argv) { if (Map->begin() == Map->end()) llvm::errs() << "warning: no debug symbols in executable (-arch " - << MachOUtils::getArchName(Map->getTriple().getArchName()) - << ")\n"; + << Map->getTriple().getArchName() << ")\n"; std::string OutputFile = getOutputFileName(InputFile, NeedsTempFiles); if (OutputFile.empty() || !linkDwarf(OutputFile, *Map, Options)) -- 2.34.1