MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / writeAsmFile

Method writeAsmFile

lib/tooling/osaca-tool.ts:39–49  ·  view source on GitHub ↗
(
        asmParser: IAsmParser,
        asm: string | any[],
        filters: ParseFiltersAndOutputOptions,
        destination: string,
    )

Source from the content-addressed store, hash-verified

37 }
38
39 async writeAsmFile(
40 asmParser: IAsmParser,
41 asm: string | any[],
42 filters: ParseFiltersAndOutputOptions,
43 destination: string,
44 ) {
45 // Applying same filters as applied to compiler output
46 const asmString = utils.normalizeAsmToString(asm);
47 const filteredAsm = asmParser.process(asmString, filters).asm.reduce((acc, line) => acc + line.text + '\n', '');
48 return fs.writeFile(destination, filteredAsm);
49 }
50
51 override async runTool(compilationInfo: CompilationInfo, inputFilepath?: string, args?: string[]) {
52 if (compilationInfo.filters.binary) {

Callers 1

runToolMethod · 0.95

Calls 1

processMethod · 0.65

Tested by

no test coverage detected