(
output: CompilationResult,
irOptions: LLVMIrBackendOptions,
filters: ParseFiltersAndOutputOptions,
)
| 1486 | } |
| 1487 | |
| 1488 | async processIrOutput( |
| 1489 | output: CompilationResult, |
| 1490 | irOptions: LLVMIrBackendOptions, |
| 1491 | filters: ParseFiltersAndOutputOptions, |
| 1492 | ): Promise<{ |
| 1493 | asm: ParsedAsmResultLine[]; |
| 1494 | languageId: string; |
| 1495 | }> { |
| 1496 | const irPath = this.getIrOutputFilename(output.inputFilename!, filters, irOptions); |
| 1497 | if (await utils.fileExists(irPath)) { |
| 1498 | const output = await fs.readFile(irPath, 'utf8'); |
| 1499 | return await this.llvmIr.process(output, irOptions); |
| 1500 | } |
| 1501 | return { |
| 1502 | asm: [{text: 'Internal error; unable to open output path'}], |
| 1503 | languageId: 'llvm-ir', |
| 1504 | }; |
| 1505 | } |
| 1506 | |
| 1507 | getClangirOutputFilename(inputFilename: string) { |
| 1508 | return utils.changeExtension(inputFilename, '.cir'); |
no test coverage detected