[demangler] Preserve line numbering in copied demangler sources
authorNathan Sidwell <nathan@acm.org>
Mon, 24 Jan 2022 14:38:47 +0000 (06:38 -0800)
committerNathan Sidwell <nathan@acm.org>
Tue, 1 Feb 2022 13:30:24 +0000 (05:30 -0800)
commitfa7834a55484f9a7add76750a448184c333fba4b
tree3a0b8d45d8cb3b547167cd3e6e6262fdf1d1d66c
parentaf8f1dbb43bc1a6267ea0b760c7b0fae635938ff
[demangler] Preserve line numbering in copied demangler sources

While prepending lines to the copied source files is functional, it
disturbs the line numbering between the original and the copy.  That
makes development more awkward than necessary, as it is the copy that
generally gets compiled first and emits compiler errors.

This uses sed to alter the first two lines, and also emits better
emacs mode setting, getting both C++ mode and read-only mode.

While here, also update and clarify documentation.

Reviewed By: ChuanqiXu

Differential Revision: https://reviews.llvm.org/D118135
libcxxabi/src/demangle/ItaniumDemangle.h
libcxxabi/src/demangle/README.txt
libcxxabi/src/demangle/StringView.h
libcxxabi/src/demangle/Utility.h
libcxxabi/src/demangle/cp-to-llvm.sh
llvm/include/llvm/Demangle/ItaniumDemangle.h
llvm/include/llvm/Demangle/README.txt
llvm/include/llvm/Demangle/StringView.h
llvm/include/llvm/Demangle/Utility.h