hanchenye-llvm-project/lld/test/undef-coalesce-error.objtxt

52 lines
1.2 KiB
Plaintext

# RUN: not lld-core -undefines-are-errors %s 2> %t.err
# RUN: FileCheck -check-prefix=CHECKERR < %t.err %s
# RUN: lld-core -undefines-are-errors=false %s | FileCheck %s
#
# Test that -undefines-are-errors triggers and error
# and that not using that option results in undefined atoms.
#
---
atoms:
- name: foo
type: code
- name: malloc
definition: undefined
- name: free
definition: undefined
---
atoms:
- name: bar
type: code
- name: malloc
definition: undefined
- name: myfunc
definition: undefined
---
atoms:
- name: myfunc
scope: global
type: code
- name: free
definition: undefined
...
# CHECKERR: free
# CHECKERR: malloc
# CHECKERR: symbol(s) not found
# CHECK: name: foo
# CHECK: name: bar
# CHECK: name: myfunc
# CHECK: name: malloc
# CHECK: definition: undefined
# CHECK: name: free
# CHECK: definition: undefined
# CHECK: ...