forked from OSchip/llvm-project
48 lines
1.0 KiB
Plaintext
48 lines
1.0 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.
|
|
#
|
|
|
|
---
|
|
defined-atoms:
|
|
- name: foo
|
|
type: code
|
|
|
|
undefined-atoms:
|
|
- name: malloc
|
|
- name: free
|
|
---
|
|
defined-atoms:
|
|
- name: bar
|
|
type: code
|
|
|
|
undefined-atoms:
|
|
- name: malloc
|
|
- name: myfunc
|
|
---
|
|
defined-atoms:
|
|
- name: myfunc
|
|
scope: global
|
|
type: code
|
|
|
|
undefined-atoms:
|
|
- name: free
|
|
...
|
|
|
|
# CHECKERR: free
|
|
# CHECKERR: malloc
|
|
# CHECKERR: symbol(s) not found
|
|
|
|
# CHECK: defined-atoms:
|
|
# CHECK: name: foo
|
|
# CHECK: name: bar
|
|
# CHECK: name: myfunc
|
|
# CHECK: undefined-atoms:
|
|
# CHECK: name: malloc
|
|
# CHECK: name: free
|
|
# CHECK: ...
|