[m-rev.] diff: fix a problem that broke hlc memprof grades
Julien Fischer
jfischer at opturion.com
Tue May 16 23:22:53 AEST 2023
Fix a problem that broke hlc memprof grades.
compiler/mlds_to_c_global.m:
Output the file names in alloc sites definitions as C string literals.
Julien.
diff --git a/compiler/mlds_to_c_global.m b/compiler/mlds_to_c_global.m
index 422ee3e..69253a6 100644
--- a/compiler/mlds_to_c_global.m
+++ b/compiler/mlds_to_c_global.m
@@ -352,9 +352,10 @@ mlds_output_alloc_site_defn(_Opts, Stream, Indent, MLDS_ModuleName,
QualFuncNameStr = qual_function_name_to_string_for_c(QualFuncName),
TypeStr = quote_string_c(Type),
Context = context(FileName, LineNumber),
+ FileNameStr = quote_string_c(FileName),
IndentStr = indent2_string(Indent),
io.format(Stream, "%s{ %s, %s, %d, %s, %d },\n",
- [s(IndentStr), s(QualFuncNameStr), s(FileName), i(LineNumber),
+ [s(IndentStr), s(QualFuncNameStr), s(FileNameStr), i(LineNumber),
s(TypeStr), i(Size)], !IO).
%---------------------------------------------------------------------------%
More information about the reviews
mailing list