[llvm] Add option to dump IR to files instead of stderr (PR #66412)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 09:36:38 PDT 2023
================
@@ -55,15 +73,19 @@ class PrintIRInstrumentation {
bool shouldPrintPassNumbers();
bool shouldPrintAtPassNumber();
- using PrintModuleDesc = std::tuple<const Module *, std::string, StringRef>;
+ void pushPassRunDescriptor(StringRef PassID, Any IR,
+ SmallString<128> &DumpIRFilename);
+ PassRunDescriptor popPassRunDescriptor(StringRef PassID);
- void pushModuleDesc(StringRef PassID, Any IR);
- PrintModuleDesc popModuleDesc(StringRef PassID);
+ SmallString<128> fetchDumpFilename(StringRef PassId, Any IR);
+ StringRef getFileSuffix(SuffixType);
----------------
aeubanks wrote:
all the `SuffixType` stuff can go in the `.cpp` file
https://github.com/llvm/llvm-project/pull/66412
More information about the llvm-commits
mailing list