forked from OSchip/llvm-project
79 lines
2.3 KiB
Plaintext
79 lines
2.3 KiB
Plaintext
|
# RUN: lld -core %s | FileCheck %s
|
||
|
|
||
|
#
|
||
|
# Test that custom sections are preserved when duplicate merge-by-content
|
||
|
# constants are coalesced.
|
||
|
#
|
||
|
|
||
|
---
|
||
|
defined-atoms:
|
||
|
- ref-name: L1
|
||
|
type: constant
|
||
|
merge: by-content
|
||
|
content: [ 01, 02, 03, 04 ]
|
||
|
section-choice: custom-required
|
||
|
section-name: .mysection
|
||
|
|
||
|
- ref-name: L2
|
||
|
type: constant
|
||
|
merge: by-content
|
||
|
content: [ 05, 06, 07, 08 ]
|
||
|
section-choice: custom-required
|
||
|
section-name: .mysection
|
||
|
|
||
|
- ref-name: L3
|
||
|
type: constant
|
||
|
merge: by-content
|
||
|
content: [ 01, 02, 03, 04 ]
|
||
|
|
||
|
---
|
||
|
defined-atoms:
|
||
|
- ref-name: L1
|
||
|
type: constant
|
||
|
merge: by-content
|
||
|
content: [ 01, 02, 03, 04 ]
|
||
|
section-choice: custom-required
|
||
|
section-name: .mysection
|
||
|
|
||
|
- ref-name: L2
|
||
|
type: constant
|
||
|
merge: by-content
|
||
|
content: [ 01, 02, 03, 04 ]
|
||
|
section-choice: custom-required
|
||
|
section-name: .mysection2
|
||
|
---
|
||
|
defined-atoms:
|
||
|
- ref-name: L1
|
||
|
type: constant
|
||
|
merge: by-content
|
||
|
content: [ 05, 06, 07, 08 ]
|
||
|
section-choice: custom-required
|
||
|
section-name: .mysection
|
||
|
|
||
|
- ref-name: L2
|
||
|
type: constant
|
||
|
merge: by-content
|
||
|
content: [ 01, 02, 03, 04 ]
|
||
|
...
|
||
|
|
||
|
|
||
|
# CHECK:defined-atoms:
|
||
|
# CHECK: - type: constant
|
||
|
# CHECK: content: [ 01, 02, 03, 04 ]
|
||
|
# CHECK: merge: by-content
|
||
|
# CHECK: section-choice: custom-required
|
||
|
# CHECK: section-name: .mysection
|
||
|
# CHECK: - type: constant
|
||
|
# CHECK: content: [ 05, 06, 07, 08 ]
|
||
|
# CHECK: merge: by-content
|
||
|
# CHECK: section-choice: custom-required
|
||
|
# CHECK: section-name: .mysection
|
||
|
# CHECK: - type: constant
|
||
|
# CHECK: content: [ 01, 02, 03, 04 ]
|
||
|
# CHECK: merge: by-content
|
||
|
# CHECK: - type: constant
|
||
|
# CHECK: content: [ 01, 02, 03, 04 ]
|
||
|
# CHECK: merge: by-content
|
||
|
# CHECK: section-choice: custom-required
|
||
|
# CHECK: section-name: .mysection2
|