wcc: c-side mangles private decls; main exempt as entry-point convention
This commit is contained in:
@@ -1174,6 +1174,10 @@ parsefile(Parser *p)
|
||||
advance(p);
|
||||
continue;
|
||||
}
|
||||
/* Stamp the lex's current `// MODULE: foo` directive on the
|
||||
* decl. cgen uses it to mangle non-exported names so two
|
||||
* modules can each privately define `cstrlen`/`streq`/etc. */
|
||||
if (d != NULL) d->module = p->l->module;
|
||||
if (head == NULL) head = d;
|
||||
else tail->next = d;
|
||||
tail = d;
|
||||
|
||||
Reference in New Issue
Block a user