MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / displayOptInfo

Method displayOptInfo

lib/base-compiler.ts:3544–3561  ·  view source on GitHub ↗
(optInfo: OptRemark)

Source from the content-addressed store, hash-verified

3542 const remarks: any = parseAllDocuments(buffer);
3543
3544 const displayOptInfo = (optInfo: OptRemark) => {
3545 let displayString = optInfo.Args.reduce((acc, x) => {
3546 let inc = '';
3547 for (const [key, value] of Object.entries(x)) {
3548 if (key === 'DebugLoc') {
3549 if (value['Line'] !== 0) {
3550 inc += ' (' + value['Line'] + ':' + value['Column'] + ')';
3551 }
3552 } else {
3553 inc += value;
3554 }
3555 }
3556 return acc + inc;
3557 }, '');
3558
3559 displayString = displayString.replaceAll('\n', ' ').replaceAll('\r', ' ');
3560 return displayString;
3561 };
3562
3563 for (const doc of remarks) {
3564 if (doc.errors !== undefined && doc.errors.length > 0) {

Callers

nothing calls this directly

Calls 1

replaceAllMethod · 0.80

Tested by

no test coverage detected