I'd be tempted to make 2 arrays so that one of the arrays could be just integers (rather than printing the line number to a string). The file names all have integers too, so you could store cname, name in a string array and fname, linenum in an integer array. To get the filename number from a filename string, I'd just call getFilenameLookupPosition from compiler/passes/insertLineNumbers.cpp (after making that function no longer static, and prototyped in a insertLineNumbers.h)  