mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-14 12:12:07 +00:00
Add //
before the banner displayed in --print-ir-before/after-all
This is making the output file (when the stream is a file) a valid MLIR file. Differential Revision: https://reviews.llvm.org/D78604
This commit is contained in:
parent
46a52ff9ed
commit
8dc790b933
@ -141,7 +141,7 @@ void IRPrinterInstrumentation::runBeforePass(Pass *pass, Operation *op) {
|
||||
beforePassFingerPrints.try_emplace(pass, op);
|
||||
|
||||
config->printBeforeIfEnabled(pass, op, [&](raw_ostream &out) {
|
||||
out << formatv("*** IR Dump Before {0} ***", pass->getName());
|
||||
out << formatv("// *** IR Dump Before {0} ***", pass->getName());
|
||||
printIR(op, config->shouldPrintAtModuleScope(), out, OpPrintingFlags());
|
||||
out << "\n\n";
|
||||
});
|
||||
@ -165,7 +165,7 @@ void IRPrinterInstrumentation::runAfterPass(Pass *pass, Operation *op) {
|
||||
}
|
||||
|
||||
config->printAfterIfEnabled(pass, op, [&](raw_ostream &out) {
|
||||
out << formatv("*** IR Dump After {0} ***", pass->getName());
|
||||
out << formatv("// *** IR Dump After {0} ***", pass->getName());
|
||||
printIR(op, config->shouldPrintAtModuleScope(), out, OpPrintingFlags());
|
||||
out << "\n\n";
|
||||
});
|
||||
@ -178,7 +178,7 @@ void IRPrinterInstrumentation::runAfterPassFailed(Pass *pass, Operation *op) {
|
||||
beforePassFingerPrints.erase(pass);
|
||||
|
||||
config->printAfterIfEnabled(pass, op, [&](raw_ostream &out) {
|
||||
out << formatv("*** IR Dump After {0} Failed ***", pass->getName());
|
||||
out << formatv("// *** IR Dump After {0} Failed ***", pass->getName());
|
||||
printIR(op, config->shouldPrintAtModuleScope(), out,
|
||||
OpPrintingFlags().printGenericOpForm());
|
||||
out << "\n\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user