[PATCH] D101110: Allow llvm-dis to disassemble multiple files

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 3 13:53:51 PDT 2021


MaskRay added inline comments.


================
Comment at: llvm/test/tools/llvm-dis/multiple-files.ll:2
+; RUN: llvm-as -o %t0 %s
+; RUN: llvm-as -o %t1 %s
+; RUN: not llvm-dis -o %t2 %t0 %t1 2>&1 | FileCheck %s --check-prefix ERROR
----------------
`cp`


================
Comment at: llvm/test/tools/llvm-dis/multiple-files.ll:4
+; RUN: not llvm-dis -o %t2 %t0 %t1 2>&1 | FileCheck %s --check-prefix ERROR
+; RUN: llvm-dis < %t0 -o - | FileCheck %s
+; RUN: llvm-dis %t0 -o - | FileCheck %s
----------------
Delete `llvm-dis < %t0`. It's not this file's purpose to test single file.


================
Comment at: llvm/test/tools/llvm-dis/multiple-files.ll:9
+; RUN: FileCheck %s < %t1.ll
+; ERROR: output file name cannot be set for multiple input files
+
----------------
make sure the prefix `error:` and filename (if exists) is in the diagnostic.


================
Comment at: llvm/tools/llvm-dis/llvm-dis.cpp:161
+    InputFilenames.push_back("-");
+  } else if (InputFilenames.size() > 1 && OutputFilename != "") {
+    errs() << "output file name cannot be set for multiple input files\n";
----------------
`!OutputFilename.empty()`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101110



More information about the llvm-commits mailing list