[llvm] 6820cb2 - [Test] Fix YAML mapping keys duplication. NFC.
Anton Sidorenko via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 9 02:00:12 PST 2023
Author: Anton Sidorenko
Date: 2023-02-09T12:59:50+03:00
New Revision: 6820cb2dd5cfa103953373b5a00b8e59365bad7f
URL: https://github.com/llvm/llvm-project/commit/6820cb2dd5cfa103953373b5a00b8e59365bad7f
DIFF: https://github.com/llvm/llvm-project/commit/6820cb2dd5cfa103953373b5a00b8e59365bad7f.diff
LOG: [Test] Fix YAML mapping keys duplication. NFC.
YAML specification does not allow keys duplication an a mapping. However, YAML
parser in LLVM does not have any check on that and uses only the last key entry.
In this change duplicated keys are merged to satisfy the spec.
Differential Revision: https://reviews.llvm.org/D141848
Added:
Modified:
bolt/test/AArch64/Inputs/plt-gnu-ld.yaml
llvm/test/CodeGen/AArch64/GlobalISel/select-int-ext.mir
llvm/test/CodeGen/ARM/machine-sink-multidef.mir
llvm/test/CodeGen/PowerPC/jump-tables-collapse-rotate-remove-SrcMI.mir
llvm/test/CodeGen/PowerPC/mi-peephole.mir
llvm/test/CodeGen/X86/fixup-bw-inst.mir
llvm/test/tools/llvm-objcopy/COFF/redefine-symbol.test
llvm/test/tools/llvm-reduce/mir/preserve-func-info.mir
llvm/unittests/TextAPI/TextStubV4Tests.cpp
Removed:
################################################################################
diff --git a/bolt/test/AArch64/Inputs/plt-gnu-ld.yaml b/bolt/test/AArch64/Inputs/plt-gnu-ld.yaml
index 04e7f85b6722a..1e3353acb633a 100644
--- a/bolt/test/AArch64/Inputs/plt-gnu-ld.yaml
+++ b/bolt/test/AArch64/Inputs/plt-gnu-ld.yaml
@@ -175,6 +175,7 @@ Sections:
Symbol: .text
Type: R_AARCH64_ADD_ABS_LO12_NC
Addend: 56
+ - Offset: 0x400540
Symbol: '__libc_start_main@@GLIBC_2.17'
Type: R_AARCH64_CALL26
- Offset: 0x400544
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/select-int-ext.mir b/llvm/test/CodeGen/AArch64/GlobalISel/select-int-ext.mir
index 230c1c56c5389..efe15c53d2f5d 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/select-int-ext.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/select-int-ext.mir
@@ -128,7 +128,6 @@ body: |
---
name: anyext_v2s64_from_v2s32
alignment: 4
-tracksRegLiveness: true
legalized: true
regBankSelected: true
tracksRegLiveness: true
diff --git a/llvm/test/CodeGen/ARM/machine-sink-multidef.mir b/llvm/test/CodeGen/ARM/machine-sink-multidef.mir
index a91cedeed841e..737ca824265d6 100644
--- a/llvm/test/CodeGen/ARM/machine-sink-multidef.mir
+++ b/llvm/test/CodeGen/ARM/machine-sink-multidef.mir
@@ -40,7 +40,6 @@ registers:
liveins:
- { reg: '$r0', virtual-reg: '%8' }
- { reg: '$r1', virtual-reg: '%9' }
-liveins: []
body: |
; CHECK-LABEL: name: g
; CHECK: bb.0:
diff --git a/llvm/test/CodeGen/PowerPC/jump-tables-collapse-rotate-remove-SrcMI.mir b/llvm/test/CodeGen/PowerPC/jump-tables-collapse-rotate-remove-SrcMI.mir
index 2f7a85a111ebb..70b13298f89e4 100644
--- a/llvm/test/CodeGen/PowerPC/jump-tables-collapse-rotate-remove-SrcMI.mir
+++ b/llvm/test/CodeGen/PowerPC/jump-tables-collapse-rotate-remove-SrcMI.mir
@@ -31,7 +31,6 @@ liveins:
frameInfo:
maxAlignment: 1
machineFunctionInfo: {}
-body: |
body: |
bb.0.entry:
liveins: $x3, $x4
diff --git a/llvm/test/CodeGen/PowerPC/mi-peephole.mir b/llvm/test/CodeGen/PowerPC/mi-peephole.mir
index c7f41cd0bc4c9..7bedc05de2df1 100644
--- a/llvm/test/CodeGen/PowerPC/mi-peephole.mir
+++ b/llvm/test/CodeGen/PowerPC/mi-peephole.mir
@@ -15,7 +15,6 @@ liveins:
frameInfo:
maxAlignment: 1
machineFunctionInfo: {}
-body: |
body: |
bb.0.entry:
liveins: $x3, $x4
diff --git a/llvm/test/CodeGen/X86/fixup-bw-inst.mir b/llvm/test/CodeGen/X86/fixup-bw-inst.mir
index 301bdb033fb14..c8e7690461601 100644
--- a/llvm/test/CodeGen/X86/fixup-bw-inst.mir
+++ b/llvm/test/CodeGen/X86/fixup-bw-inst.mir
@@ -139,7 +139,8 @@ name: test5
alignment: 16
tracksRegLiveness: true
liveins:
- - { reg: '$ch', reg: '$bl' }
+ - { reg: '$ch' }
+ - { reg: '$bl' }
body: |
bb.0:
liveins: $ch, $bl
diff --git a/llvm/test/tools/llvm-objcopy/COFF/redefine-symbol.test b/llvm/test/tools/llvm-objcopy/COFF/redefine-symbol.test
index 263d6f31188d6..84511f10f57e7 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/redefine-symbol.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/redefine-symbol.test
@@ -39,7 +39,6 @@ sections:
- Name: .text
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
- Name: .rdata
- Characteristics: [ ]
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
symbols:
- Name: .text
diff --git a/llvm/test/tools/llvm-reduce/mir/preserve-func-info.mir b/llvm/test/tools/llvm-reduce/mir/preserve-func-info.mir
index 22e41bf030015..5f11cea89d7e7 100644
--- a/llvm/test/tools/llvm-reduce/mir/preserve-func-info.mir
+++ b/llvm/test/tools/llvm-reduce/mir/preserve-func-info.mir
@@ -45,7 +45,6 @@ failsVerification: true
tracksDebugUserValues: true
callsEHReturn: true
callsUnwindInit: true
-callsUnwindInit: true
hasEHCatchret: true
hasEHScopes: true
hasEHFunclets: true
diff --git a/llvm/unittests/TextAPI/TextStubV4Tests.cpp b/llvm/unittests/TextAPI/TextStubV4Tests.cpp
index f2327ca85d687..570e853f35067 100644
--- a/llvm/unittests/TextAPI/TextStubV4Tests.cpp
+++ b/llvm/unittests/TextAPI/TextStubV4Tests.cpp
@@ -936,7 +936,8 @@ TEST(TBDv4, InterfaceEquality) {
static const char TBDv4File[] =
"--- !tapi-tbd\n"
"tbd-version: 4\n"
- "targets: [ i386-macos, x86_64-macos, x86_64-ios ]\n"
+ "targets: [ i386-macos, x86_64-macos, x86_64-ios, i386-maccatalyst, "
+ "x86_64-maccatalyst ]\n"
"uuids:\n"
" - target: i386-macos\n"
" value: 00000000-0000-0000-0000-000000000000\n"
@@ -944,6 +945,10 @@ TEST(TBDv4, InterfaceEquality) {
" value: 11111111-1111-1111-1111-111111111111\n"
" - target: x86_64-ios\n"
" value: 11111111-1111-1111-1111-111111111111\n"
+ " - target: i386-maccatalyst\n"
+ " value: 00000000-0000-0000-0000-000000000000\n"
+ " - target: x86_64-maccatalyst\n"
+ " value: 11111111-1111-1111-1111-111111111111\n"
"flags: [ flat_namespace, installapi ]\n"
"install-name: Umbrella.framework/Umbrella\n"
"current-version: 1.2.3\n"
@@ -970,6 +975,13 @@ TEST(TBDv4, InterfaceEquality) {
" symbols: [_symB]\n"
" - targets: [ x86_64-macos, x86_64-ios ]\n"
" symbols: [_symAB]\n"
+ " - targets: [ i386-maccatalyst ]\n"
+ " weak-symbols: [ _symC ]\n"
+ " - targets: [ i386-maccatalyst, x86_64-maccatalyst ]\n"
+ " symbols: [ _symA ]\n"
+ " objc-classes: [ Class1 ]\n"
+ " - targets: [ x86_64-maccatalyst ]\n"
+ " symbols: [ _symAB ]\n"
"reexports:\n"
" - targets: [ i386-macos ]\n"
" symbols: [_symC]\n"
@@ -986,22 +998,6 @@ TEST(TBDv4, InterfaceEquality) {
" objc-ivars: []\n"
" weak-symbols: []\n"
" thread-local-symbols: []\n"
- "tbd-version: 4\n"
- "targets: [ i386-maccatalyst, x86_64-maccatalyst ]\n"
- "uuids:\n"
- " - target: i386-maccatalyst\n"
- " value: 00000000-0000-0000-0000-000000000000\n"
- " - target: x86_64-maccatalyst\n"
- " value: 11111111-1111-1111-1111-111111111111\n"
- "install-name: '/System/Library/Frameworks/A.framework/A'\n"
- "exports:\n"
- " - targets: [ i386-maccatalyst ]\n"
- " weak-symbols: [ _symC ]\n"
- " - targets: [ i386-maccatalyst, x86_64-maccatalyst ]\n"
- " symbols: [ _symA ]\n"
- " objc-classes: [ Class1 ]\n"
- " - targets: [ x86_64-maccatalyst ]\n"
- " symbols: [ _symAB ]\n"
"...\n";
Expected<TBDFile> ResultA =
More information about the llvm-commits
mailing list