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

Class LLVMPDBUtilTool

lib/tooling/llvm-pdbutil-tool.ts:29–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27import {BaseTool} from './base-tool.js';
28
29export class LLVMPDBUtilTool extends BaseTool {
30 static get key() {
31 return 'llvm-pdbutil-tool';
32 }
33
34 override async runTool(compilationInfo: CompilationInfo, inputFilepath?: string, args?: string[]) {
35 if (!compilationInfo.filters.binary) {
36 return this.createErrorResponse(`${this.tool.name ?? 'llvm-pdbutil'} requires an executable`);
37 }
38
39 let filename = compilationInfo.executableFilename;
40 if (!(await fileExists(filename))) {
41 filename = compilationInfo.outputFilename;
42 }
43
44 // If a PDB is generated, it will be named after the executable.
45 const dotIdx = filename.lastIndexOf('.');
46 if (dotIdx >= 0) {
47 filename = filename.slice(0, dotIdx) + '.pdb';
48 }
49
50 return super.runTool(compilationInfo, filename, args);
51 }
52}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected