Hi,
When -S is specified or -save-temps is specified, the compiler will generate
assembly files and include .file directives in the format of
.file "<filename>"
or .file <num> "<filename>"
with any non-printing characters converted to their escaped octal sequence,
see EmitFileDirective() in llvm/lib/MC/MCAsmStreamer.cpp.
Problem is that when the integrated assembler reads back the assembly file,
it is not converting these escaped sequence back to the original value. The
fix is needed to carry out the necessary conversion. There are two related
directives (.incbin and .include) that might take a file name as argument.
Clang does not generate them but may read in such directives from other
compilers. I think it is reasonable to fix these two directives as well,
just to be compatible with GNU binutils behavior.
This is part of a bigger effort to support foreign characters in file names.
Could someone review this patch?
Many thanks,
- Gao.