[codeview] Fix buggy BeginIndexMapSize assertion
authorReid Kleckner <rnk@google.com>
Wed, 29 Mar 2017 22:51:22 +0000 (22:51 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 29 Mar 2017 22:51:22 +0000 (22:51 +0000)
commitacd9a6f09d391bb14155d95791cafa78dec279df
treeea9fa745289a923abfef8e9edb968a707a8a985c
parentb8a728f9938afd526422907d273208e06c06a039
[codeview] Fix buggy BeginIndexMapSize assertion

This assert is just trying to test that processing each record adds
exactly one entry to the index map. The assert logic was wrong when the
first record in the type stream was a field list.

I've simplified the code by moving the LF_FIELDLIST-specific logic into
the callback for that record type.

llvm-svn: 299035
llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp
llvm/test/tools/llvm-readobj/Inputs/codeview-merging-anon.obj [new file with mode: 0644]
llvm/test/tools/llvm-readobj/codeview-merging-anon.test [new file with mode: 0644]