This was originally uploaded as D32615, but some problems were discovered in the way that filenames were mapped to indices, which necessitated some preliminary refactoring. That has been done, so this is the new patch uploaded, based on top of the refactorings. Hopefully this diff is much smaller than before.
For example usage of the API, see the yamlToPdb function in llvm-pdbdump.cpp