From bcf1836a443d4b7c48485f6d03c818ea4d60a107 Mon Sep 17 00:00:00 2001 From: Yonghong Song Date: Wed, 20 Feb 2019 00:22:19 +0000 Subject: [PATCH] [BPF] make test case reloc-btf.ll tolerable for old compilers The test case reloc-btf.ll is generated with an IR containing spFlags introduced by https://reviews.llvm.org/rL347806. In the case of BTF backporting, the old compiler may not have this patch, so this test will fail during validation. This patch removed spFlags from IR in the test case and used the old way for various flags. Acked-by: Alexei Starovoitov Signed-off-by: Yonghong Song git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354409 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/BPF/reloc-btf.ll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/CodeGen/BPF/reloc-btf.ll b/test/CodeGen/BPF/reloc-btf.ll index 4d6e3f5b1f0..b2011ef30f1 100644 --- a/test/CodeGen/BPF/reloc-btf.ll +++ b/test/CodeGen/BPF/reloc-btf.ll @@ -19,14 +19,14 @@ attributes #0 = { norecurse nounwind readnone "correctly-rounded-divide-sqrt-fp- !llvm.module.flags = !{!3, !4, !5} !llvm.ident = !{!6} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 8.0.0 (trunk 350573) (llvm/trunk 350569)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 8.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None) !1 = !DIFile(filename: "tt.c", directory: "/home/yhs/tmp") !2 = !{} !3 = !{i32 2, !"Dwarf Version", i32 4} !4 = !{i32 2, !"Debug Info Version", i32 3} !5 = !{i32 1, !"wchar_size", i32 4} !6 = !{!"clang version 8.0.0 (trunk 350573) (llvm/trunk 350569)"} -!7 = distinct !DISubprogram(name: "test", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2) +!7 = distinct !DISubprogram(name: "test", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, isDefinition: true, isOptimized: true, unit: !0, retainedNodes: !2) !8 = !DISubroutineType(types: !9) !9 = !{!10} !10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -- 2.11.0