clang/lib/Frontend/PrintPreprocessedOutput.cpp has a problem with unknown pragmas.
It inserts an additional empty line after each unrecognized pragma.
It means such a file:
# some comment 1 # some comment 2 # some comment 3
Will be preprocessed (clang -cc1 -E -x assembler-with-cpp) into:
# some comment 1 # some comment 2 # some comment 3
And it breaks debug info (generate wrong line numbers).
For sure, '#' is not right symbol for llvm assembly comments, but it is still a bug.
Here is patch to fix such behaviour.