llvm: backport latest YAMLIO from LLVM HEAD