Fix a long-standing bug and misfeature of the disassembler: when dealing with a
authorChris Lattner <sabre@nondot.org>
Sun, 1 Mar 2009 00:03:38 +0000 (00:03 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 1 Mar 2009 00:03:38 +0000 (00:03 +0000)
commit413fd2304db8b6fa3113e5f70d925087f27cbf84
treeaadca5920dfe9589e7853f610b264f051c3d5fc9
parente9fa33eb6629aea72cd59560216bb6a7b8ebc689
Fix a long-standing bug and misfeature of the disassembler: when dealing with a
stripped .bc file, it didn't make any attempt to try to reuse anonymous types.
This causes an amazing type explosion due to types getting duplicated everywhere
they are referenced and other problems.

This also caused correctness issues, because opaque types are unique for each time
they are uttered in the file.  This means that stripping a .bc file could produce
a .ll file that could not be assembled (e.g. 2009-02-28-StripOpaqueName.ll).

This patch fixes both of these issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65738 91177308-0d34-0410-b5e6-96231b3b80d8
lib/VMCore/AsmWriter.cpp
test/Assembler/2009-02-28-StripOpaqueName.ll [new file with mode: 0644]