CodeView has an S_COMPILE3 record to identify the compiler and source language of the compiland.
This record comes first in the debug$S section for the compiland. The debuggers rely on this record to know the source language of the code.
I'm not thrilled about how this infers the CPUType and how it has to parse the compiler version from the producer string in the DICompileUnit. If you know of a better way to get at this information, I'd be happy to improve this patch.
This should be in the anonymous namespace.