2
0

alias.ll 636 B

123456789101112131415161718192021222324252627
  1. ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
  2. declare void @f()
  3. @fa = alias void ()* @f
  4. ; CHECK: Alias must point to a definition
  5. ; CHECK-NEXT: @fa
  6. @g = external global i32
  7. @ga = alias i32* @g
  8. ; CHECK: Alias must point to a definition
  9. ; CHECK-NEXT: @ga
  10. @test2_a = alias i32* @test2_b
  11. @test2_b = alias i32* @test2_a
  12. ; CHECK: Aliases cannot form a cycle
  13. ; CHECK-NEXT: i32* @test2_a
  14. ; CHECK-NEXT: Aliases cannot form a cycle
  15. ; CHECK-NEXT: i32* @test2_b
  16. @test3_a = global i32 42
  17. @test3_b = weak alias i32* @test3_a
  18. @test3_c = alias i32* @test3_b
  19. ; CHECK: Alias cannot point to a weak alias
  20. ; CHECK-NEXT: i32* @test3_c