Emit __clangast in custom section instead of named data segment
to find it while iterating sections.
This could be avoided if all data segements (the wasm sense) were
represented as their own sections (in the llvm sense).
This can be resolved by https://github.com/WebAssembly/tool-conventions/issues/138
And the on-disk hashtable in clangast needs to be aligned by 4 bytes,
so add paddings in name length field in custom section header.
The length of clangast section name can be represented in 1 byte
by leb128, and possible maximum pads are 3 bytes, so the section
name length won't be invalid in theory.
I would leave the first sentence alone which that applies to all custom sections. The second part of this sentence (the new part) is maybe not needed since you have a comment already on line 378.
Also, how about keeping the simpler form in the default case, and putting this new code in a new method. e.g.:
Then the entire new method can be marked with the TODO to remove it if/when we change the section mapping.