Fix for PR23310: llvm-dis crashes when trying to upgrade an intrinsic.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 2 Jul 2015 16:22:40 +0000 (16:22 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 2 Jul 2015 16:22:40 +0000 (16:22 +0000)
commit9afb3a2589997dee6cbd322e52853a4663871143
treeea832644df4639b514e29c5ac82c79fd2ba2c8d5
parent3a27979633d2d1c6e8ebf43b402a1147da7f0809
Fix for PR23310: llvm-dis crashes when trying to upgrade an intrinsic.

When trying to upgrade @llvm.x86.sse2.psrl.dq while parsing a module,
BitcodeReader adds the function to its worklist twice, resulting in a
crash when accessing it the second time.

This patch replaces the worklist vector by a map.

Patch by Philip Pfaffe.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241281 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Reader/BitcodeReader.cpp
test/Bitcode/Inputs/PR23310.bc [new file with mode: 0644]
test/Bitcode/PR23310.test [new file with mode: 0644]