[codeview] Delete FunctionInfo copy ctor and move out of DenseMap
authorReid Kleckner <rnk@google.com>
Thu, 15 Mar 2018 21:12:21 +0000 (21:12 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 15 Mar 2018 21:12:21 +0000 (21:12 +0000)
commit55baeefd54b1e89551545b01b82c5fbf041bb0ad
tree26879fd3b6b39a5814cbc0d577a711b7d7b3cc0b
parenta21d5f1e180e3b6831bf818bf723ad55e6a061e0
[codeview] Delete FunctionInfo copy ctor and move out of DenseMap

We were unnecessarily copying a bunch of these FunctionInfo objects
around when rehashing the DenseMap.

Furthermore, r327620 introduced pointers referring to objects owned by
FunctionInfo, and the default copy ctor did the wrong thing in this
case, leading to use-after-free when the DenseMap gets rehashed.

I will rebase r327620 on this next and recommit it.

llvm-svn: 327665
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h