type-unique-src-type.ll 697 B

123456789101112131415161718192021222324
  1. ; RUN: llvm-as %s -o %t.bc
  2. ; RUN: llvm-link -S %t.bc -o - | FileCheck %s
  3. ; RUN: llvm-link -S %s -o - | FileCheck %s
  4. ; Test that we don't try to map %C.0 and C and then try to map %C to a new type.
  5. ; This used to happen when lazy loading since we wouldn't then identify %C
  6. ; as a destination type until it was too late.
  7. ; CHECK: %C.0 = type { %B }
  8. ; CHECK-NEXT: %B = type { %A }
  9. ; CHECK-NEXT: %A = type { i8 }
  10. ; CHECK: @g1 = external global %C.0
  11. ; CHECK: getelementptr %C.0, %C.0* null, i64 0, i32 0, i32 0
  12. %A = type { i8 }
  13. %B = type { %A }
  14. %C = type { %B }
  15. %C.0 = type { %B }
  16. define void @f1() {
  17. getelementptr %C, %C* null, i64 0, i32 0, i32 0
  18. ret void
  19. }
  20. @g1 = external global %C.0