summaryrefslogtreecommitdiff
path: root/llvm/test/Verifier/used-uses.ll
blob: 2dda638021e1817bd8cfafe021804ae25dc4d02d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s

; CHECK: invalid uses of intrinsic global variable
; CHECK-NEXT: ptr @llvm.used
@llvm.used = appending global [1 x ptr] [ptr @foo]

; CHECK: invalid uses of intrinsic global variable
; CHECK-NEXT: ptr @llvm.compiler.used
@llvm.compiler.used = appending global [1 x ptr] [ptr @bar]

define void @foo() {
  ret void
}

define void @bar() {
  ret void
}

@used_user = global ptr @llvm.used
@compiler_used_user = global ptr @llvm.compiler.used