Fix filename backslash escapes in C code (#5947).

This commit is contained in:
Wilson Snyder
2025-04-29 19:27:38 -04:00
parent d3016b62f5
commit 5ca62de167
14 changed files with 72 additions and 24 deletions
+1 -1
View File
@@ -654,7 +654,7 @@ class TimingControlVisitor final : public VNVisitor {
void addDebugInfo(AstCMethodHard* const methodp) const {
if (v3Global.opt.protectIds()) return;
FileLine* const flp = methodp->fileline();
AstCExpr* const ap = new AstCExpr{flp, '"' + flp->filename() + '"', 0};
AstCExpr* const ap = new AstCExpr{flp, '"' + flp->filenameEsc() + '"', 0};
ap->dtypeSetString();
methodp->addPinsp(ap);
AstCExpr* const bp = new AstCExpr{flp, cvtToStr(flp->lineno()), 0};