1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/Assembler/2009-02-28-StripOpaqueName.ll
Chris Lattner f270618038 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.

llvm-svn: 65738
2009-03-01 00:03:38 +00:00

7 lines
192 B
LLVM

; RUN: llvm-as < %s | opt -strip | llvm-dis | llvm-as | llvm-dis
; Stripping the name from A should not break references to it.
%A = type opaque
@g1 = external global %A
@g2 = global %A* @g1