@@ -582,6 +582,9 @@ static int genJniJar(const mlir::OwningOpRef<ModuleOp> &module,
582
582
583
583
// Copy javaruntime.jar to model jar.
584
584
llvm::sys::fs::copy_file (javaRuntimeJarPath, modelJniJarPath);
585
+ if (VerboseOutput)
586
+ llvm::outs () << " cp " << javaRuntimeJarPath << " " << modelJniJarPath
587
+ << " \n " ;
585
588
586
589
// Add shared library to model jar.
587
590
Command jar (getToolPath (" jar" , true ));
@@ -798,8 +801,8 @@ static int emitOutputFiles(std::string outputNameNoExt,
798
801
return rc;
799
802
}
800
803
if (VerboseOutput)
801
- printf (
802
- " Object file '%s' has been compiled.\n " , modelObjNameWithExt. c_str ()) ;
804
+ llvm::outs () << " Object file ' " << modelObjNameWithExt
805
+ << " ' has been compiled.\n " ;
803
806
} break ;
804
807
case EmitLib: {
805
808
std::string sharedLibNameWithExt;
@@ -813,8 +816,8 @@ static int emitOutputFiles(std::string outputNameNoExt,
813
816
return rc;
814
817
}
815
818
if (VerboseOutput)
816
- printf ( " Shared library '%s' has been compiled. \n " ,
817
- sharedLibNameWithExt. c_str ()) ;
819
+ llvm::outs () << " Shared library '" << sharedLibNameWithExt
820
+ << " ' has been compiled. \n " ;
818
821
} break ;
819
822
case EmitJNI: {
820
823
int rc = compileModuleToJniJar (module, outputNameNoExt);
@@ -826,16 +829,17 @@ static int emitOutputFiles(std::string outputNameNoExt,
826
829
return rc;
827
830
}
828
831
if (VerboseOutput)
829
- printf (
830
- " JNI archive '%s .jar' has been compiled.\n " , outputNameNoExt. c_str ()) ;
832
+ llvm::outs () << " JNI archive ' " << outputNameNoExt
833
+ << " .jar' has been compiled.\n " ;
831
834
} break ;
832
835
default : {
833
836
// Emit the version with all constants included.
834
- std::string ouputNameWithExt =
837
+ std::string outputNameWithExt =
835
838
getTargetFilename (outputNameNoExt, emissionTarget);
836
- int rc = outputCode (module, ouputNameWithExt );
839
+ int rc = outputCode (module, outputNameWithExt );
837
840
if (VerboseOutput)
838
- printf (" Full MLIR code written to: \n\t %s\n\n " , ouputNameWithExt.c_str ());
841
+ llvm::outs () << " Full MLIR code written to:\n "
842
+ << " \t " << outputNameWithExt << " \n\n " ;
839
843
if (rc != CompilerSuccess)
840
844
return rc;
841
845
@@ -845,10 +849,11 @@ static int emitOutputFiles(std::string outputNameNoExt,
845
849
std::string tempNameWithExt = outputNameNoExt + " .tmp" ;
846
850
int rc = outputCode (module, tempNameWithExt, /* largeElementLimit=*/ 100 );
847
851
if (VerboseOutput) {
848
- printf (" Constant-free MLIR Code written to: \n\t %s\n\n " ,
849
- tempNameWithExt.c_str ());
850
- printf (" Use:\n\t %s\n to continue lowering the code to other dialects.\n " ,
851
- ouputNameWithExt.c_str ());
852
+ llvm::outs () << " Constant-free MLIR Code written to:\n "
853
+ << " \t " << tempNameWithExt << " \n\n " ;
854
+ llvm::outs () << " Use:\n "
855
+ << " \t " << outputNameWithExt
856
+ << " \n to continue lowering the code to other dialects.\n " ;
852
857
}
853
858
if (rc != CompilerSuccess)
854
859
return rc;
0 commit comments