diff --git a/llvm/test/tools/llvm-libtool-darwin/no-symbols-warning.test b/llvm/test/tools/llvm-libtool-darwin/no-symbols-warning.test
--- a/llvm/test/tools/llvm-libtool-darwin/no-symbols-warning.test
+++ b/llvm/test/tools/llvm-libtool-darwin/no-symbols-warning.test
@@ -9,7 +9,7 @@
 # RUN: llvm-libtool-darwin -static -o %t.lib %t-x86_64-empty.o 2>&1 | \
 # RUN:   FileCheck --check-prefix=WARNING %s -DPREFIX=%basename_t.tmp
 
-# WARNING: warning: [[PREFIX]]-x86_64-empty.o has no symbols
+# WARNING: warning: '[[PREFIX]]-x86_64-empty.o': has no symbols for architecture x86_64
 
 # RUN: llvm-libtool-darwin -no_warning_for_no_symbols -static -o %t.lib \
 # RUN:   %t-x86_64-empty.o 2>&1 | \
diff --git a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
--- a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
+++ b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
@@ -360,8 +360,9 @@
 
       auto *O = dyn_cast<MachOObjectFile>(ObjOrErr->get());
       uint32_t FileCPUType, FileCPUSubtype;
+      StringRef ArchName = O->getArchTriple().getArchName();
       std::tie(FileCPUType, FileCPUSubtype) = MachO::getCPUTypeFromArchitecture(
-          MachO::getArchitectureFromName(O->getArchTriple().getArchName()));
+          MachO::getArchitectureFromName(ArchName));
 
       // If -arch_only is specified then skip this file if it doesn't match
       // the architecture specified.
@@ -370,7 +371,9 @@
       }
 
       if (!NoWarningForNoSymbols && O->symbols().empty())
-        WithColor::warning() << Member.MemberName + " has no symbols\n";
+        WithColor::warning() << "'" + Member.MemberName +
+                                    "': has no symbols for architecture " +
+                                    ArchName + "\n";
 
       uint64_t FileCPUID = getCPUID(FileCPUType, FileCPUSubtype);
       Builder.Data.MembersPerArchitecture[FileCPUID].push_back(