testlink.ll 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. %intlist = type { %intlist*, i32 }
  2. %Ty1 = type { %Ty2* }
  3. %Ty2 = type opaque
  4. %VecSize = type { <10 x i32> }
  5. @GVTy1 = global %Ty1* null
  6. @GVTy2 = external global %Ty2*
  7. @MyVar = global i32 4
  8. @MyIntList = external global %intlist
  9. @AConst = constant i32 1234
  10. ;; Intern in both testlink[12].ll
  11. @Intern1 = internal constant i32 52
  12. @Use2Intern1 = global i32* @Intern1
  13. ;; Intern in one but not in other
  14. @Intern2 = constant i32 12345
  15. @MyIntListPtr = constant { %intlist* } { %intlist* @MyIntList }
  16. @MyVarPtr = linkonce global { i32* } { i32* @MyVar }
  17. @0 = constant i32 412
  18. ; Provides definition of Struct1 and of S1GV.
  19. %Struct1 = type { i32 }
  20. @S1GV = global %Struct1* null
  21. define i32 @foo(i32 %blah) {
  22. store i32 %blah, i32* @MyVar
  23. %idx = getelementptr %intlist, %intlist* @MyIntList, i64 0, i32 1
  24. store i32 12, i32* %idx
  25. %ack = load i32, i32* @0
  26. %fzo = add i32 %ack, %blah
  27. ret i32 %fzo
  28. }
  29. declare void @unimp(float, double)
  30. define internal void @testintern() {
  31. ret void
  32. }
  33. define void @Testintern() {
  34. ret void
  35. }
  36. define internal void @testIntern() {
  37. ret void
  38. }
  39. declare void @VecSizeCrash1(%VecSize)