xref: /llvm-project/llvm/test/CodeGen/X86/dso_local_equivalent_errors.ll (revision 79565766be94f7944278671a9f473d79ac18f7e1)
1; RUN: split-file %s %t
2; RUN: not llc -mtriple=x86_64-linux-gnu -o - %t/undefined_func.ll 2>&1 | FileCheck %s -check-prefix=UNDEFINED
3; RUN: not llc -mtriple=x86_64-linux-gnu -o - %t/invalid_arg.ll 2>&1 | FileCheck %s -check-prefix=INVALID
4
5;--- undefined_func.ll
6; UNDEFINED: error: unknown function 'undefined_func' referenced by dso_local_equivalent
7define void @call_undefined() {
8  call void dso_local_equivalent @undefined_func()
9  ret void
10}
11
12;--- invalid_arg.ll
13; INVALID: error: expected a function, alias to function, or ifunc in dso_local_equivalent
14define void @call_global_var() {
15  call void dso_local_equivalent @glob()
16  ret void
17}
18
19@glob = constant i32 1
20