[llvm] Add option to dump IR to files intstead of stderr (PR #66412)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 14 13:57:22 PDT 2023


================
@@ -0,0 +1,57 @@
+; RUN: mkdir -p %t/logs
+; RUN: rm -rf %t/logs
+
+; Basic dump before and after a single module pass
+
+; RUN: opt %s -disable-output -passes='no-op-module' -ir-dump-directory %t/logs -print-after=no-op-module -print-before=no-op-module
+; RUN: find %t/logs -type f -print | sort | FileCheck %s --check-prefix=SINGLE-PASS
----------------
ellishg wrote:

You can also add something like `--implicit-check-not='.ll'` to be sure that we aren't dumping extra files

https://github.com/llvm/llvm-project/pull/66412


More information about the llvm-commits mailing list