[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:20 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:

Instead of calling `sort`, we can take advantage of the `DAG` directive: https://www.llvm.org/docs/CommandGuide/FileCheck.html#the-check-dag-directive

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


More information about the llvm-commits mailing list