@@ -552,7 +552,7 @@ static CodeGenFileType fromRust(LLVMRustFileType Type) {
552552extern " C" LLVMRustResult
553553LLVMRustWriteOutputFile (LLVMTargetMachineRef Target, LLVMPassManagerRef PMR ,
554554 LLVMModuleRef M, const char *Path, const char *DwoPath,
555- LLVMRustFileType RustFileType) {
555+ LLVMRustFileType RustFileType, bool VerifyIR ) {
556556 llvm::legacy::PassManager *PM = unwrap<llvm::legacy::PassManager>(PMR );
557557 auto FileType = fromRust (RustFileType);
558558
@@ -577,10 +577,10 @@ LLVMRustWriteOutputFile(LLVMTargetMachineRef Target, LLVMPassManagerRef PMR,
577577 return LLVMRustResult::Failure;
578578 }
579579 auto DBOS = buffer_ostream (DOS );
580- unwrap (Target)->addPassesToEmitFile (*PM , BOS , &DBOS , FileType, false );
580+ unwrap (Target)->addPassesToEmitFile (*PM , BOS , &DBOS , FileType, !VerifyIR );
581581 PM ->run (*unwrap (M));
582582 } else {
583- unwrap (Target)->addPassesToEmitFile (*PM , BOS , nullptr , FileType, false );
583+ unwrap (Target)->addPassesToEmitFile (*PM , BOS , nullptr , FileType, !VerifyIR );
584584 PM ->run (*unwrap (M));
585585 }
586586
0 commit comments