<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 3, 2015, at 3:51 AM, Alexander Kornienko <<a href="mailto:alexfh@google.com" class="">alexfh@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote">On Fri, Jul 31, 2015 at 10:22 PM, Frederic Riss<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:friss@apple.com" target="_blank" class="">friss@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">Author: friss<br class="">Date: Fri Jul 31 15:22:20 2015<br class="">New Revision: 243777<br class=""><br class="">URL:<span class="Apple-converted-space"> </span><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D243777-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=UMyPSj9080B-N96WH1Ml1ZsvVlYEWkT0dQgmb2WFLns&s=gqDhSc1IGGlbRMaAderrN7AMpM0vCKLD8_0WCnT4d_0&e=" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=243777&view=rev</a><br class="">Log:<br class="">[dsymutil] Support multiple input files on the command line<br class=""><br class="">Added:<br class="">   <span class="Apple-converted-space"> </span>llvm/trunk/test/tools/dsymutil/X86/multiple-inputs.test<br class="">Modified:<br class="">   <span class="Apple-converted-space"> </span>llvm/trunk/test/tools/dsymutil/basic-linking.test<br class="">   <span class="Apple-converted-space"> </span>llvm/trunk/tools/dsymutil/dsymutil.cpp<br class=""><br class="">Added: llvm/trunk/test/tools/dsymutil/X86/multiple-inputs.test<br class="">URL:<span class="Apple-converted-space"> </span><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_tools_dsymutil_X86_multiple-2Dinputs.test-3Frev-3D243777-26view-3Dauto&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=UMyPSj9080B-N96WH1Ml1ZsvVlYEWkT0dQgmb2WFLns&s=FuKpEe94OnSAKU-XNkmZsM64W-B8Cv30x8HtCSJzgZk&e=" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/dsymutil/X86/multiple-inputs.test?rev=243777&view=auto</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/tools/dsymutil/X86/multiple-inputs.test (added)<br class="">+++ llvm/trunk/test/tools/dsymutil/X86/multiple-inputs.test Fri Jul 31 15:22:20 2015<br class="">@@ -0,0 +1,12 @@<br class="">+REQUIRES: shell<br class="">+RUN: cat %p/../Inputs/basic.macho.x86_64 > %t1<br class="">+RUN: cat %p/../Inputs/basic-archive.macho.x86_64 > %t2<br class="">+RUN: cat %p/../Inputs/basic-lto.macho.x86_64 > %t3<br class="">+RUN: cat %p/../Inputs/basic-lto-dw4.macho.x86_64 > %t4<br class="">+RUN: llvm-dsymutil -oso-prepend-path=%p/.. %t1 %t2 %t3 %t4<br class="">+RUN: llvm-dwarfdump %t1.dwarf \<br class="">+ | FileCheck %S/basic-linking-x86.test --check-prefix=CHECK --check-prefix=BASIC<br class=""></blockquote><div class=""><br class=""></div><div class="">FYI, this line must be also prefixed with RUN:. Fixed in r243868.</div></div></div></div></div></blockquote><div><br class=""></div><div>Doh, thanks. I’m surprised this didn’t fail anywhere then…</div><div><br class=""></div><div>Fred</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">+RUN: llvm-dwarfdump %t2.dwarf \<br class="">+ | FileCheck %S/basic-linking-x86.test --check-prefix=CHECK --check-prefix=ARCHIVE<br class=""></blockquote><div class=""><br class=""></div><div class="">ditto</div><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">+RUN: llvm-dwarfdump %t3.dwarf | FileCheck %S/basic-lto-linking-x86.test<br class="">+RUN: llvm-dwarfdump %t4.dwarf | FileCheck %S/basic-lto-dw4-linking-x86.test<br class=""><br class="">Modified: llvm/trunk/test/tools/dsymutil/basic-linking.test<br class="">URL:<span class="Apple-converted-space"> </span><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_tools_dsymutil_basic-2Dlinking.test-3Frev-3D243777-26r1-3D243776-26r2-3D243777-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=UMyPSj9080B-N96WH1Ml1ZsvVlYEWkT0dQgmb2WFLns&s=jz9nNsEnBSnqRZ1-o3MxernmQCVxPmlNrK9KdGgn8LU&e=" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/dsymutil/basic-linking.test?rev=243777&r1=243776&r2=243777&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/tools/dsymutil/basic-linking.test (original)<br class="">+++ llvm/trunk/test/tools/dsymutil/basic-linking.test Fri Jul 31 15:22:20 2015<br class="">@@ -1,6 +1,7 @@<br class=""> RUN: llvm-dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 | FileCheck %s<br class=""> RUN: llvm-dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic-lto.macho.x86_64 | FileCheck %s --check-prefix=CHECK-LTO<br class=""> RUN: llvm-dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic-archive.macho.x86_64 | FileCheck %s --check-prefix=CHECK-ARCHIVE<br class="">+RUN: llvm-dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 %p/Inputs/basic-lto.macho.x86_64 %p/Inputs/basic-archive.macho.x86_64 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-LTO --check-prefix=CHECK-ARCHIVE<br class=""><br class=""> This test check the basic Dwarf linking process through the debug dumps.<br class=""><br class=""><br class="">Modified: llvm/trunk/tools/dsymutil/dsymutil.cpp<br class="">URL:<span class="Apple-converted-space"> </span><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_tools_dsymutil_dsymutil.cpp-3Frev-3D243777-26r1-3D243776-26r2-3D243777-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=UMyPSj9080B-N96WH1Ml1ZsvVlYEWkT0dQgmb2WFLns&s=gSAFmw8KthrbNihnXGR95bMJgSoJGkZcFxKI8FuQ0Oc&e=" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/dsymutil.cpp?rev=243777&r1=243776&r2=243777&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/tools/dsymutil/dsymutil.cpp (original)<br class="">+++ llvm/trunk/tools/dsymutil/dsymutil.cpp Fri Jul 31 15:22:20 2015<br class="">@@ -31,8 +31,8 @@ OptionCategory DsymCategory("Specific Op<br class=""> static opt<bool> Help("h", desc("Alias for -help"), Hidden);<br class=""> static opt<bool> Version("v", desc("Alias for -version"), Hidden);<br class=""><br class="">-static opt<std::string> InputFile(Positional, desc("<input file>"),<br class="">-                                  init("a.out"), cat(DsymCategory));<br class="">+static list<std::string> InputFiles(Positional, OneOrMore,<br class="">+                                    desc("<input files>"), cat(DsymCategory));<br class=""><br class=""> static opt<std::string><br class="">     OutputFileOpt("o",<br class="">@@ -90,9 +90,6 @@ int main(int argc, char **argv) {<br class="">     return 0;<br class="">   }<br class=""><br class="">-  auto DebugMapPtrOrErr =<br class="">-      parseDebugMap(InputFile, OsoPrependPath, Verbose, InputIsYAMLDebugMap);<br class="">-<br class="">   Options.Verbose = Verbose;<br class="">   Options.NoOutput = NoOutput;<br class="">   Options.NoODR = NoODR;<br class="">@@ -102,27 +99,40 @@ int main(int argc, char **argv) {<br class="">   llvm::InitializeAllTargets();<br class="">   llvm::InitializeAllAsmPrinters();<br class=""><br class="">-  if (auto EC = DebugMapPtrOrErr.getError()) {<br class="">-    llvm::errs() << "error: cannot parse the debug map for \"" << InputFile<br class="">-                 << "\": " << EC.message() << '\n';<br class="">+  if (InputFiles.size() > 1 && !OutputFileOpt.empty()) {<br class="">+    llvm::errs() << "error: cannot use -o with multiple inputs\n";<br class="">     return 1;<br class="">   }<br class=""><br class="">-  if (Verbose || DumpDebugMap)<br class="">-    (*DebugMapPtrOrErr)->print(llvm::outs());<br class="">-<br class="">-  if (DumpDebugMap)<br class="">-    return 0;<br class="">+  for (auto &InputFile : InputFiles) {<br class="">+    auto DebugMapPtrOrErr =<br class="">+        parseDebugMap(InputFile, OsoPrependPath, Verbose, InputIsYAMLDebugMap);<br class="">+<br class="">+    if (auto EC = DebugMapPtrOrErr.getError()) {<br class="">+      llvm::errs() << "error: cannot parse the debug map for \"" << InputFile<br class="">+                   << "\": " << EC.message() << '\n';<br class="">+      return 1;<br class="">+    }<br class="">+<br class="">+    if (Verbose || DumpDebugMap)<br class="">+      (*DebugMapPtrOrErr)->print(llvm::outs());<br class="">+<br class="">+    if (DumpDebugMap)<br class="">+      continue;<br class="">+<br class="">+    std::string OutputFile;<br class="">+    if (OutputFileOpt.empty()) {<br class="">+      if (InputFile == "-")<br class="">+        OutputFile = "a.out.dwarf";<br class="">+      else<br class="">+        OutputFile = InputFile + ".dwarf";<br class="">+    } else {<br class="">+      OutputFile = OutputFileOpt;<br class="">+    }<br class=""><br class="">-  std::string OutputFile;<br class="">-  if (OutputFileOpt.empty()) {<br class="">-    if (InputFile == "-")<br class="">-      OutputFile = "a.out.dwarf";<br class="">-    else<br class="">-      OutputFile = InputFile + ".dwarf";<br class="">-  } else {<br class="">-    OutputFile = OutputFileOpt;<br class="">+    if (!linkDwarf(OutputFile, **DebugMapPtrOrErr, Options))<br class="">+      return 1;<br class="">   }<br class=""><br class="">-  return !linkDwarf(OutputFile, **DebugMapPtrOrErr, Options);<br class="">+  return 0;<br class=""> }<br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></blockquote></div></div></div></div></blockquote></div><br class=""></body></html>