2013-04-05 02:59:24 +08:00
|
|
|
# RUN: lld -core %s | FileCheck %s
|
2011-12-22 10:38:01 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# Test that weak definitions are coalesced away in favor of a regular definition
|
|
|
|
#
|
|
|
|
|
|
|
|
---
|
2013-01-05 10:22:35 +08:00
|
|
|
defined-atoms:
|
2011-12-22 10:38:01 +08:00
|
|
|
- name: _foo
|
2013-01-05 10:22:35 +08:00
|
|
|
merge: as-weak
|
2012-01-05 07:58:17 +08:00
|
|
|
scope: global
|
2011-12-22 10:38:01 +08:00
|
|
|
type: data
|
|
|
|
---
|
2013-01-05 10:22:35 +08:00
|
|
|
defined-atoms:
|
2011-12-22 10:38:01 +08:00
|
|
|
- name: _foo
|
2012-01-05 07:58:17 +08:00
|
|
|
scope: global
|
2011-12-22 10:38:01 +08:00
|
|
|
type: data
|
|
|
|
---
|
2013-01-05 10:22:35 +08:00
|
|
|
defined-atoms:
|
2011-12-22 10:38:01 +08:00
|
|
|
- name: _foo
|
2013-01-05 10:22:35 +08:00
|
|
|
merge: as-weak
|
2012-01-05 07:58:17 +08:00
|
|
|
scope: global
|
2011-12-22 10:38:01 +08:00
|
|
|
type: data
|
|
|
|
...
|
|
|
|
|
|
|
|
|
|
|
|
# CHECK: name: _foo
|
2013-01-05 10:22:35 +08:00
|
|
|
# CHECK-NOT: merge: as-weak
|
2011-12-22 10:38:01 +08:00
|
|
|
# CHECK-NOT: name: _foo
|
|
|
|
# CHECK: ...
|