Fix bug in getCompleteTypeIndex in codeview debug info

Summary:
When there are multiple instances of a forward decl record type, only the first one is emitted with a type index, because
the type is added to a map with a null type index. Avoid this by reordering so that forward decl types aren't added to the map.

Reviewers: rnk

Subscribers: aprantl, hiraditya, arphaman, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61460

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360101 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed